diff options
Diffstat (limited to 'packages/db/src/index.ts')
| -rw-r--r-- | packages/db/src/index.ts | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/packages/db/src/index.ts b/packages/db/src/index.ts index 26b3116e..9b395ab6 100644 --- a/packages/db/src/index.ts +++ b/packages/db/src/index.ts @@ -8,12 +8,12 @@ const { DATABASE_URL } = keys(); let _db: ReturnType<typeof drizzle> | null = null; function getDb() { - if (!_db) { - const client = postgres(DATABASE_URL); - _db = drizzle(client, { schema }); - } + if (!_db) { + const client = postgres(DATABASE_URL); + _db = drizzle(client, { schema }); + } - return _db; + return _db; } // Export a proxy that forwards all calls to the actual db instance @@ -24,15 +24,15 @@ export * from "./schema"; // Re-export drizzle-orm functions to ensure version consistency export { - eq, - and, - or, - not, - isNull, - isNotNull, - inArray, - notInArray, - exists, - notExists, - sql, + eq, + and, + or, + not, + isNull, + isNotNull, + inArray, + notInArray, + exists, + notExists, + sql, } from "drizzle-orm"; |
