-
-
Notifications
You must be signed in to change notification settings - Fork 611
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
I have a situation where I have some pretty complex raw queries that are being constructed. To avoid dealing with escaping values myself, I'd like to let the query builder handle this. Additionally, because the queries are complex and constructed in many steps, I'd rather not have the ordering of the replacements be significant. In many other tools, I would use "named bindings" to do this, but I can't find any example of this in the docs.
For example, something like runQuery('SELECT * FROM mytable WHERE foo = :fooval', { fooval: 'value to use in the query' })
Knex mentions this here as "named bindings", but I can't seem to find the right way to get access to this method, as the TS type for queryBuilder.raw() only accepts a single string.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed