mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 06:28:54 +00:00
feat: isReady and awaitConnection exports
This commit is contained in:
1 parent
11b21f8ed2
commit
c97a07a377
2 files changed
+36
-14
No files matched your search
@@ -2,10 +2,20 @@ import { CFXCallback, CFXParameters, TransactionQuery } from './types';
|
||||
import { rawQuery } from './database/rawQuery';
|
||||
import { rawTransaction } from './database/rawTransaction';
|
||||
import { rawExecute } from './database/rawExecute';
|
||||
import { isServerConnected, waitForConnection } from './database';
|
||||
import('./update');
|
||||
|
||||
const MySQL = {} as Record<string, Function>;
|
||||
|
||||
MySQL.isReady = () => {
|
||||
return isServerConnected;
|
||||
};
|
||||
|
||||
MySQL.awaitConnection = async () => {
|
||||
await waitForConnection();
|
||||
return true;
|
||||
};
|
||||
|
||||
MySQL.query = (
|
||||
query: string,
|
||||
parameters: CFXParameters,
|
||||
|
||||
Reference in new issue
Block a user