Raw SQL query (`.execute()` doesn't exist)

I'm trying to run a raw SQL query for sqlite3 with the Bun driver and I'm finding that .execute() doesn't exist. Anyone got any leads?
import Database from "bun:sqlite"
import { drizzle } from "drizzle-orm/bun-sqlite"

/** raw Bun database client */
export const sqlite = new Database("db.sqlite", { strict: true })

/** Drizzle database client */
export const db = drizzle(sqlite)

const email = "[email protected]"

const query = sql<{exists:boolean}>`select exists(${db.select({ n: sql`1` }).from(User).where(eq(User.email, email))}) as exists`
import Database from "bun:sqlite"
import { drizzle } from "drizzle-orm/bun-sqlite"

/** raw Bun database client */
export const sqlite = new Database("db.sqlite", { strict: true })

/** Drizzle database client */
export const db = drizzle(sqlite)

const email = "[email protected]"

const query = sql<{exists:boolean}>`select exists(${db.select({ n: sql`1` }).from(User).where(eq(User.email, email))}) as exists`
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server