drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: Add param substitution to `.toSQL()` function
Open
enhancement
qb/crud
rqb
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Feature hasn't been suggested before.
- [X] I have verified this feature I'm about to request hasn't been suggested before.
### Describe the enhancement you want to request
the `toSQL()` function currently returns an object with:
```
{
sql: `select "name", "address", "postcode"`,
params: [ 'John Doe', '221B Baker Street, London', 'NW1 6XE' ]
}
```
It would be good to add a parameter / options to the toSQL function to substitute the variables and return a raw SQL string that can be used in other DB clients / GUIs.
Contributor guide
Assessment
This issue has not been assessed yet.