planetscale / database-js

A Fetch API-compatible PlanetScale database driver
https://planetscale.com/docs/tutorials/planetscale-serverless-driver
Apache License 2.0
1.17k stars 35 forks source link

Support named parameter replacement #23

Closed dgraham closed 2 years ago

dgraham commented 2 years ago

Provide an object with replacement parameter values to be substituted for names beginning with a colon.

conn.execute('select 1 from dual where 1=:id', { id: 42 })
// => select 1 form dual where 1=42