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
The Describe message (statement variant) specifies the name of an existing prepared statement (or an empty string for the unnamed prepared statement). The response is a ParameterDescription message describing the parameters needed by the statement https://www.postgresql.org/docs/13/protocol-flow.html
This means that you will get a list of the types of all input parameters.
Then you just need to encode all the input parameters in accordance with the types that you received from this response.
Then this query will work correctly:
sql`SELECT ${[1,2,3]}::int[]`
The text was updated successfully, but these errors were encountered:
You do not need to send an additional request for Describe.
Just need to change the current flow of requests, on such:
send Parse sql
send Describe 'S'
receive ParameterDescription - save result for reuse
receive RowDescription - save result for reuse
send Bind
send Execute
In response ParameterDescription - all oid for param types.
Users will not need to use helper methods such as sql.json(), sql.array() ...
Hello.
The documentation says:
This means that you will get a list of the types of all input parameters.
Then you just need to encode all the input parameters in accordance with the types that you received from this response.
Then this query will work correctly:
The text was updated successfully, but these errors were encountered: