Files
oxmysql/src/database/index.ts
T
Linden c38f646bb9 refactor(database): add new connection class and misc tweaks
Use disposable symbol to ensure connection cleanup.
Improvements to internal types.
Code splitting and removal of redundant variables.
2024-06-17 15:33:39 +10:00

24 lines
460 B
TypeScript

import { setDebug } from '../config';
import { sleep } from '../utils/sleep';
import { pool, createConnectionPool } from './pool';
setTimeout(async () => {
setDebug();
while (!pool) {
await createConnectionPool();
if (!pool) await sleep(30000);
}
});
setInterval(() => {
setDebug();
}, 1000);
export * from './connection';
export * from './rawQuery';
export * from './rawExecute';
export * from './rawTransaction';
export * from './pool';