pg-mem
pg-mem copied to clipboard
Support parameterized statements
Parameterized statements are a good way to guard against SQL injection attacks. Many projects use them, and the fact that pg-mem doesn't support them makes these projects less likely to use pg-mem for their unit tests. Something like this would be great:
import {newDb} from 'pg-mem';
const db = newDb();
db.public.none(`INSERT INTO mytable (a, b, c, d) VALUES ($1, $2, $3, $2)`, [42, 'hi', false]);
Hi !
It's on my roadmap 👍
FYI: Currently, query args passed by adapters are handled like this
Thanks :)