How to use drizzle as a sql builder?
I want to use drizzle with planet scale. Sadly for mysql drizzle does not support the returning function (although databasejs returns e.g the insertedId after an insert statement). Anyways I would be more than happy to just use drizzle as a SQL builder so I can pass the SQL to planet scale through databasejs. Any ideas how to achieve that? Awesome library by far, keep up the great work!
2 Replies
I think Drizzle passes along the response from databasejs in that case, no?
In any case, you can invoke
.toSQL()
on any query builder to get the SQL string and params list.Thank you for your response! You are right I somehow missed that, both points are valid so maximum stuff to utilize