File size: 357 Bytes
1b44660
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import { drizzle } from 'drizzle-orm/postgres-js';
import postgres from 'postgres';

import * as schema from './schema';

export const client = (url: string, options?: postgres.Options<{}> | undefined) => postgres(url, options);

export const getDb = (url: string, options?: postgres.Options<{}> | undefined) =>
  drizzle(client(url, options), { schema });