You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,18 @@
5
5
6
6
# Changelog
7
7
8
+
## v0.3.0 (2025-08-01)
9
+
10
+
### Enhancement
11
+
- Improve SQL generation with 57-344x compared to Ecto [#12](https://github.com/elixir-dbvisor/sql/pull/12).
12
+
- Fix bug for complex CTE [#15](https://github.com/elixir-dbvisor/sql/pull/15). Thanks to @kafaichoi
13
+
- Support for PostgresSQL GiST operators [#18](https://github.com/elixir-dbvisor/sql/pull/18). Thanks to @ibarchenkov
14
+
-`float` and `integer` nodes have now become `numeric` with metadata to distinguish `sign`, `whole` and `fractional`[#19](https://github.com/elixir-dbvisor/sql/pull/19).
15
+
-`keyword` nodes are now `ident` with metadata distinguish if it's a `keyword`[#19](https://github.com/elixir-dbvisor/sql/pull/19).
16
+
-`SQL.Lexer.lex/4` now returns `{:ok, context, tokens}`[#19](https://github.com/elixir-dbvisor/sql/pull/19).
17
+
-`SQL.Parser.parse/1` has become `SQL.Parser.parse/2` and takes `tokens` and `context` from `SQL.Lexer.lex/4` and returns `{:ok, context, tokens}` or raises an error [#19](https://github.com/elixir-dbvisor/sql/pull/19).
result=Tuple.to_list(SQL.Lexer.lex("with recursive temp (n, fact) as (select 0, 1 union all select n+1, (n+1)*fact from temp where n < 9)",__ENV__.file))
13
+
tokens=Enum.at(result,-1)
14
+
context=Enum.at(result,1)
11
15
Benchee.run(
12
16
%{
13
-
"to_string"=>fn->for_<-range,do: to_string(~SQL[with recursive temp (n, fact) as (select 0, 1 union all select n+1, (n+1)*fact from temp where n < 9)])end,
14
-
"to_sql"=>fn->for_<-range,do: SQL.to_sql(~SQL[with recursive temp (n, fact) as (select 0, 1 union all select n+1, (n+1)*fact from temp where n < 9)])end,
15
-
"inspect"=>fn->for_<-range,do: inspect(~SQL[with recursive temp (n, fact) as (select 0, 1 union all select n+1, (n+1)*fact from temp where n < 9)])end,
deftoken_to_string({tag,_,value},mod)whentagin~w[select from fetch limit where order offset group having with join by distinct create type drop insert alter table add into delete update start grant revoke set declare open close commit rollback references recursive]ado
84
+
deftoken_to_string({tag,_,value},mod)whentagin~w[select from fetch limit where order offset group having with join by distinct create type drop insert alter table add into delete update start grant revoke set declare open close commit rollback references recursive outer]ado
@@ -71,19 +99,13 @@ defmodule SQL.Adapters.ANSI do
71
99
deftoken_to_string({tag,_,[left,right]},mod)whentagin~w[:: [\] <> <= >= != || + - ^ * / % < > = like ilike as union except intersect between and or on is not in cursor for to]ado
0 commit comments