1aa875114 days ago23 lines · 656 B| 1 | import { drizzle } from "drizzle-orm/node-postgres"; |
| 2 | import { Pool, type |
| 3 | |
| 4 | import * as schema |
| 5 | |
| 6 | export type Database |
| 7 | |
| 8 | export function createDatabase( |
| 9 | config: PoolConfig |
| 10 | ) { |
| 11 | const connectionString = |
| 12 | |
| 13 | if (!connectionString) |
| 14 | throw new Error( |
| 15 | } |
| 16 | |
| 17 | const pool = |
| 18 | const db = |
| 19 | |
| 20 | return { db, |
| 21 | } |
| 22 | |
| 23 | export type { Pool, |