Skip to content

Commit c442022

Browse files
committed
Add bracket to token_to_sql and token_to_string
1 parent 1b6d542 commit c442022

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/adapters/ansi.ex

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ defmodule SQL.Adapters.ANSI do
3838
def token_to_string({:parens, _, value}, mod) do
3939
"(#{mod.token_to_string(value)})"
4040
end
41+
def token_to_string({:bracket, _, value}, mod) do
42+
"[#{mod.token_to_string(value)}]"
43+
end
4144
def token_to_string({:colon, _, value}, mod) do
4245
"; #{mod.token_to_string(value)}"
4346
end

lib/string.ex

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ defmodule SQL.String do
3333
def token_to_sql({:parens, _, value}, mod) do
3434
"(#{mod.token_to_sql(value)})"
3535
end
36+
def token_to_sql({:bracket, _, value}, mod) do
37+
"[#{mod.token_to_sql(value)}]"
38+
end
3639
def token_to_sql({:colon, _, value}, mod) do
3740
"; #{mod.token_to_sql(value)}"
3841
end

0 commit comments

Comments
 (0)