drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: Add support for sqlcommenter
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
> sqlcommenter is a suite of middlewares/plugins that enable your ORMs to augment SQL statements before execution, with comments containing information about the code that caused its execution. This helps in easily correlating slow performance with source code and giving insights into backend database performance. In short it provides some observability into the state of your client-side applications and their impact on the database’s server-side.
https://google.github.io/sqlcommenter/
This can be achieved today with Drizzle on manual `sql` queries, but there is no way to use the native Drizzle selectors. Adding sqlcommenter would make easier to tag those, even though it's an "opinionated" library mostly used in Google Cloud.
Sample usage (options):
```
const result = await db.select().from(users).comment({ hello: "world" });
const result = await db.select().from(users).tag({ foo: "bar" });
```
Contributor guide
Assessment
This issue has not been assessed yet.