switch to deno.land/postgresjs for free 4x speed increase

This commit is contained in:
Siddharth Singh
2024-07-01 21:42:50 +05:30
parent ae140933f5
commit 98aaab8e51
4 changed files with 10 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ export class DittoPostgres {
if (!this.db) {
this.db = new Kysely({
dialect: new PostgresJSDialect({
postgres: postgres(Conf.databaseUrl)
postgres: postgres(Conf.databaseUrl) as any
}),
log: KyselyLogger
});

View File

@@ -62,3 +62,5 @@ export async function getTestDB() {
[Symbol.asyncDispose]: () => kysely.destroy(),
};
}
export const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));