uptrace / bun

SQL-first Golang ORM
https://bun.uptrace.dev
BSD 2-Clause "Simplified" License
3.46k stars 206 forks source link

Is it possible to insert a comment before or after a sql query? #998

Open pragkent opened 3 weeks ago

pragkent commented 3 weeks ago

Is it possible to insert a comment before or after a sql query? We have a database middleware which parse hint from comment and route the request to the real backend mysql instances.

The query is something like:

/* shard = shard-00 */ select * from users where id = 100;