Execute is not exist on a type LibSQLDatabase
const url = env.TURSO_DB_URL
if (url === undefined) {
throw new Error('TURSO_DB_URL is not defined');
}
const authToken = env.TURSO_DB_AUTH_TOKEN
if (authToken === undefined) {
throw new Error('TURSO_DB_AUTH_TOKEN is not defined');
}
const ab = await drizzle(createClient({ url, authToken }))
c.set('db', ab.execute())
the type is LibSQLDatabase<Record<string,never>>
9 Replies
I'm having the same issue.
db.execute
is undefined, maybe it's just not supported? Surprised the docs didn't mention itWhat is this line trying to achieve?
c.set('db', ab.execute())
IDK, I just wanted to try a raw sql query and I can’t when using libsql
Well, you're executing an empty raw sql?
You're calling execute with no query
That’s not my code :). The issue is that
execute
method doesn’t existCan you spin up a repro repo? I haven't seen this issue before
I believe it's just an issue on the docs here https://orm.drizzle.team/docs/sql#sql-template
Magical sql operator 🪄 - DrizzleORM
Drizzle ORM | %s