Skip to content

Commit fd06167

Browse files
authored
Quote Entities with Double Quotes (#39)
This patch ensures that we actually quote entities (prefix, table name, column name, alias) with double quotes(`"`). This is important since it allows to use otherwise reserved keywords like `order` to be used. The tests have been adapted to reflect this change. Closes #38
1 parent a83b901 commit fd06167

File tree

2 files changed

+387
-366
lines changed

2 files changed

+387
-366
lines changed

lib/ecto/adapters/sqlite3/connection.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ defmodule Ecto.Adapters.SQLite3.Connection do
17041704
quote_entity(Atom.to_string(val))
17051705
end
17061706

1707-
defp quote_entity(val), do: [val]
1707+
defp quote_entity(val), do: [[?", val, ?"]]
17081708

17091709
defp intersperse_map(list, separator, mapper, acc \\ [])
17101710

0 commit comments

Comments
 (0)