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
When 0 parameters are passed in, I get a SQL syntax error:
error: syntax error at or near ")"
Digging in, I find that indeed, this SQL is invalid:
UPDATE "relms" SET () = ROW () WHERE relm = $1 RETURNING *
Is there a simple way to check that the updates object in my function has any non-undefined values? Maybe export getDefinedKeys from pg-sql-helpers and check that length > 0?
The text was updated successfully, but these errors were encountered:
@canadaduane ah interesting, I'd be open to some sort of helper exported to do that. Maybe there's a specific isEmpty helper that we could add for this use case?
I have an update function that takes 0 or more parameters, and updates a table:
When 0 parameters are passed in, I get a SQL syntax error:
Digging in, I find that indeed, this SQL is invalid:
Is there a simple way to check that the
updates
object in my function has any non-undefined values? Maybe exportgetDefinedKeys
from pg-sql-helpers and check that length > 0?The text was updated successfully, but these errors were encountered: