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
function execute(prepared::String, nts::Vector{<:NamedTuple})::ExecuteResult
conn = current_conn()
stmt = LibPQ.prepare(conn, prepared)
for tup in nts
@info :tup tup
LibPQ.execute(stmt, collect(tup))
end
ExecuteResult()
end
collect(tup) should be changed as for SQLFunction.
Repo.insert!(Here, (name="test1", lnglat=ST_GeomFromEWKT("SRID=4326;POINT(12 34)")))
generate error sql: INSERT INTO heres (name, lnglat) VALUES ($1, $2) (name = "test1", lnglat = SQLFunction(:ST_GeomFromEWKT, ("SRID=4326;POINT(12 34)",)))
I think it should be correct to generate such code: INSERT INTO heres (name, lnglat) VALUES ($1, ST_GeomFromEWKT($2)) (name = "test1", lnglat = "SRID=4326;POINT(12 34)")
sql function should place in the list of VALUES.
Table DDL:
INSERT INTO heres (name, lnglat) VALUES ('test2',ST_GeomFromEWKT('SRID=4326;POINT(12 34)'))
sql works fine.
julia code:
The error message as follows:
What is the problem?
The text was updated successfully, but these errors were encountered: