sql-template-tag
sql-template-tag copied to clipboard
ES2015 tagged template string for preparing SQL statements, works with `pg`, `mysql`, and `sqlite`
Hi @blakeembrey! First, thanks for the helpful open source! I use this for Prisma raw query very well, but I think it would be helpful if the error is thrown...
This adds functionality for easily passing in bulk inserts. Signed-off-by: Tobias Gurtzick
Follow up from https://github.com/blakeembrey/sql-template-tag/pull/41#issuecomment-2067816748, prototyping a backward compatible way to add bind parameters. TL;DR adds `BIND_PARAM` symbol, when seen it increments a counter, counter is used in a new `.bind`...
DuckDB has a unique way of formatting arguments that requires the type be specified after a `?::` for positional arguments. I added support for my own use case and it...
## Background Based on #41 and issues raised with both `oracledb` (cf [`oracledb` issue 1629](https://github.com/oracle/node-oracledb/issues/1629)) and the database team at Oracle, support for `sql-template-tag` was added for JavaScript "stored procedures"....
The [Stricter TypeScript](https://github.com/blakeembrey/sql-template-tag?tab=readme-ov-file#stricter-typescript) section of the README is a bit unhelpful: Simply creating a new `sql` function, as prescribed, results in `Sql` instances where the `values` property is still the...
Hi! Thanks for this awersome library! Some library like `pg` has a `name` parameter for prepared statement. My suggestion is autogenerate this name, maybe by hashing the SQL Eg.: ```ts...