You can still use drizzle for building the query, I am using Kysely and have a simple utility functi

You can still use drizzle for building the query, I am using Kysely and have a simple utility function:
export function batch(d1: D1Database, statements: InsertQueryBuilder<DB, any, any>[]) {
  return d1.batch(
    statements.map((s) => {
      const compiled = s.compile()
      return d1.prepare(compiled.sql).bind(...compiled.parameters)
    })
  )
}


I assume that drizzle has something similar to kysely's compile function
Was this page helpful?