summaryrefslogtreecommitdiff
path: root/packages/db/src/index.ts
diff options
context:
space:
mode:
authorHyteq <DerpsDer.es@gmail.com>2025-07-20 10:50:17 +0300
committerHyteq <DerpsDer.es@gmail.com>2025-07-20 10:50:17 +0300
commitfe020be6cea00691d6ce66e21843915defa5e944 (patch)
tree65718c8aee56a61b6c42032f8ebd96915cd13dc6 /packages/db/src/index.ts
parenteab8ec3ba81b86fdd4ade920d999c28fb34785b1 (diff)
downloadopencut-fe020be6cea00691d6ce66e21843915defa5e944.tar.gz
Revert "format, cleanup, deps"
This reverts commit eab8ec3ba81b86fdd4ade920d999c28fb34785b1.
Diffstat (limited to 'packages/db/src/index.ts')
-rw-r--r--packages/db/src/index.ts32
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";