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
In order to use bind parameters with the Sequelize query interface I have 2 options:
A) Find and replace '$slonik_' in the sql query string to create numbered bind parameters
B) produce an object from values array { slonik_1: , slonik_2: }
I would prefer to have the shape I need returned from the library call instead of having to alter the output.
Given that this is part of migration to Sequelize, has anyone faced this issue before and if so, what was your solution? Perhaps I am missing an option or API call that I should be making in place of sql.type(MyZodType)
The text was updated successfully, but these errors were encountered:
anthonyorona
changed the title
Is there support for producing queries with numbered bind parameters or producing an object with named bind parameters?
Is there support for producing sql with numbered bind parameters or producing a values object with named bind parameters?
Dec 11, 2024
I am migrating to Slonik and use it for query building. I am constrained to use the Sequelize query interface as my DB client.
In order to use bind parameters with the Sequelize query interface I have 2 options:
A) Find and replace '$slonik_' in the sql query string to create numbered bind parameters
B) produce an object from values array { slonik_1: , slonik_2: }
see: https://sequelize.org/docs/v6/core-concepts/raw-queries/#bind-parameter
I would prefer to have the shape I need returned from the library call instead of having to alter the output.
Given that this is part of migration to Sequelize, has anyone faced this issue before and if so, what was your solution? Perhaps I am missing an option or API call that I should be making in place of sql.type(MyZodType)
The text was updated successfully, but these errors were encountered: