Best way to run safe raw queries when only having access to the table name?

Hey I'm working a Drizzle adapter for a library. The Adapter API only has access to the db Drizzle instance and the table name, what's the best way to perform a SELECT * FROM table given only those two parameters? The sql operator works by passing not the table name, but the schema (which I dont have access to) so I tried sql.raw but it doesn't escape variables. I could escape them manually, but maybe there's an easier/better way.
0 Replies
No replies yetBe the first to reply to this messageJoin