Setup drizzle using 'pg' instead of 'postgres' driver package

I'm trying to setup my drizzle using pg instead of postgres due to the bug for row locking according to this post https://discord.com/channels/1043890932593987624/1199760580102336633 however it said that the parameter was not supported using the pg client
import {Client} from 'pg';
import { drizzle } from 'drizzle-orm/postgres-js';
import schema from '@/(server)/_schema/index';

const queryClient = new Client({
user: Option.user,
host: Option.host,
database: Option.database,
password: Option.pass,
port: Option.port,
});

await queryClient.connect()

// Error on passing queryClient as parameter
export const db = drizzle(queryClient, {schema: schema});
import {Client} from 'pg';
import { drizzle } from 'drizzle-orm/postgres-js';
import schema from '@/(server)/_schema/index';

const queryClient = new Client({
user: Option.user,
host: Option.host,
database: Option.database,
password: Option.pass,
port: Option.port,
});

await queryClient.connect()

// Error on passing queryClient as parameter
export const db = drizzle(queryClient, {schema: schema});
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server