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>>
hugo
hugo238d ago
I'm having the same issue. db.execute is undefined, maybe it's just not supported? Surprised the docs didn't mention it
Angelelz
Angelelz238d ago
What is this line trying to achieve? c.set('db', ab.execute())
hugo
hugo237d ago
IDK, I just wanted to try a raw sql query and I can’t when using libsql
Angelelz
Angelelz237d ago
Well, you're executing an empty raw sql? You're calling execute with no query
hugo
hugo237d ago
That’s not my code :). The issue is that execute method doesn’t exist
Angelelz
Angelelz237d ago
Can you spin up a repro repo? I haven't seen this issue before
hugo
hugo237d ago
No description
hugo
hugo237d ago
import { createClient } from '@libsql/client'
import { drizzle } from 'drizzle-orm/libsql'

const db = drizzle(createClient({ url: String(process.env.DATABASE_URL) }))
import { createClient } from '@libsql/client'
import { drizzle } from 'drizzle-orm/libsql'

const db = drizzle(createClient({ url: String(process.env.DATABASE_URL) }))
hugo
hugo237d ago
I believe it's just an issue on the docs here https://orm.drizzle.team/docs/sql#sql-template
Want results from more Discord servers?
Add your server
More Posts
Transactions, PgBouncer/Supavisor, prepared statementsokay... i have spent way to long trying to figure out why when using transactions and a pooler on trhow enable wal for sqlite with drizzle ?how enable wal for sqlite with drizzle ?Simple ForeignKey With statement not workingHi - I am attempting to use a with statement on a query and am getting this error: Cannot read propMySQL UUID as PKI am unable to get a PK setup which has a default UUID value. I have ```ts logID: varchar('logID'totalCount from relational queryis it somehow possible to get the total count of a relational query? Core queries aren't possible hCannot read properties of undefined (reading \'columns\')I tired using relational queries ` const bookmarkdb = drizzle(pool, { schema }); coDoes Drizzle support Microsoft SQL Server?Does Drizzle support Microsoft SQL Server ?Findfirst and Findmany configHello I am new to using drizzle and can't seem to make the findFirst and findMany work. I am using pTrouble running JEST testing in Hono for Cloudfare WorkersSo, I have an API setup in Hono with cloudfare workers and I setup the JEST tests but they don't seeHelp migrating a nested Prisma updateBeen trying to set this up without going through the raw sql route for some time but cant seem to wrWhich typescript type should I use for select?Hi, this question might be confusing. Let me explain the problem, I'm building a common function forpush:sqlite creating weird tablesWhen I run push:sqlite, tables like `__old_push_categories` are created and are automatically refrenUsing a placeholder with an inArrayI'm porting a query to a prepared statement, in the query I used to do something like: ``` .where(iDB insertion - Date field (mode: string) is using default value instead of passed valueTrying to insert an Order object which has a "pickupTime" Date field to db, but upon insertion the cBest practice on connections for PostgreSQLI got the following error; `remaining connection slots are reserved for non-replication superuser cMinimum value for Postgres bigserialI want my id tables to use bigserial, but i want the first row to be inserted with the value 222222.Prepend raw fields with table/subquery name in rendered SQLCurrently, it doesn't seem like raw fields in a select statement hold any information on the table/sIs there a faster way todo this?```typescript await db.transaction(async (tx) => { for (let i = 0; i < data.length; i++) { Using one function to query many tables of same structureHello i have many tables (5-6) that have same structure like this ```ts export const speciality = pgHow can I use a schema to generate something like this:We have a 1 to many relationship between items and tokens, but an item can only have one minted toke