defmacro st_transform(wkt, srid) do
quote do: expr(fragment("ST_Transform(?,?)", unquote(wkt), unquote(srid)))
end
give me the error
(DBConnection.EncodeError) Postgrex expected a binary, got 28355.
where 28355 is the srid
if i use my own fragment
fragment(
"ST_Within(?, ST_Transform(boundary, ?::integer)
it works
defmacro st_transform(wkt, srid) do
quote do: expr(fragment("ST_Transform(?,?)", unquote(wkt), unquote(srid)))
end
give me the error
(DBConnection.EncodeError) Postgrex expected a binary, got 28355.
where 28355 is the srid
if i use my own fragment
fragment(
"ST_Within(?, ST_Transform(boundary, ?::integer)
it works