Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/ecto/adapters/myxql/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,10 @@ if Code.ensure_loaded?(MyXQL) do
["(0 + ", Float.to_string(literal), ?)]
end

defp expr(expr, _sources, query) do
error!(query, "unsupported expression: #{inspect(expr)}")
end

defp interval(count, "millisecond", sources, query) do
["INTERVAL (", expr(count, sources, query) | " * 1000) microsecond"]
end
Expand Down
4 changes: 4 additions & 0 deletions lib/ecto/adapters/postgres/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,10 @@ if Code.ensure_loaded?(Postgrex) do
[Float.to_string(literal) | "::float"]
end

defp expr(expr, _sources, query) do
error!(query, "unsupported expression: #{inspect(expr)}")
end

defp type_unless_typed(%Ecto.Query.Tagged{}, _type), do: []
defp type_unless_typed(_, type), do: [?:, ?: | type]

Expand Down