diff options
| author | Hyteq <DerpsDer.es@gmail.com> | 2025-07-20 10:48:40 +0300 |
|---|---|---|
| committer | Hyteq <DerpsDer.es@gmail.com> | 2025-07-20 10:48:40 +0300 |
| commit | eab8ec3ba81b86fdd4ade920d999c28fb34785b1 (patch) | |
| tree | 619fc6930f50fa36d6f1f94ee81fb8bf6d4bedef /packages/db/src/index.ts | |
| parent | d040ca53cb4029c9c58bd7e6b6dfd1eed2694b31 (diff) | |
| download | opencut-eab8ec3ba81b86fdd4ade920d999c28fb34785b1.tar.gz | |
format, cleanup, deps
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 9b395ab6..26b3116e 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"; |
