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
One thing that's a little awkward to do is to pass queries that have parameters to it (e.g., which have come from pg-promise or slonik similar).
So say I've got an object that looks like { sql: 'select * from foo where id = $1', values: ['abc'] } - I'd love to be able to pass them straight to pg-mem and have it work. (like db.public.query(myQuery.sql, myQuery.values)).
Right now I've got a terrible workaround which works for the very limited use-case I have so far, but I think it will break as soon as I do something more complex, so I'm thinking there's already a better way, or if not, there could be:
Hi! Love pg-mem.
One thing that's a little awkward to do is to pass queries that have parameters to it (e.g., which have come from pg-promise or slonik similar).
So say I've got an object that looks like
{ sql: 'select * from foo where id = $1', values: ['abc'] }
- I'd love to be able to pass them straight to pg-mem and have it work. (likedb.public.query(myQuery.sql, myQuery.values)
).Right now I've got a terrible workaround which works for the very limited use-case I have so far, but I think it will break as soon as I do something more complex, so I'm thinking there's already a better way, or if not, there could be:
If this is already possible, it can become a docs request.
The text was updated successfully, but these errors were encountered: