u
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import sql from 'mssql';
|
import sql from 'mssql';
|
||||||
import LibDashStore from 'libdashstore';
|
import LibDashStore from 'libdashstore';
|
||||||
|
import { MssqlProvider } from 'libdashstore/providers/mssql';
|
||||||
import env from '../config/env.js';
|
import env from '../config/env.js';
|
||||||
|
|
||||||
let pool;
|
let pool;
|
||||||
@@ -119,7 +120,9 @@ export async function getStore() {
|
|||||||
if (!connecting) {
|
if (!connecting) {
|
||||||
connecting = (async () => {
|
connecting = (async () => {
|
||||||
pool = await new sql.ConnectionPool(getMssqlConfig()).connect();
|
pool = await new sql.ConnectionPool(getMssqlConfig()).connect();
|
||||||
store = wrapStoreWithTiming(await new LibDashStore(pool));
|
store = wrapStoreWithTiming(
|
||||||
|
await new LibDashStore(new MssqlProvider(pool))
|
||||||
|
);
|
||||||
return store;
|
return store;
|
||||||
})().finally(() => {
|
})().finally(() => {
|
||||||
connecting = undefined;
|
connecting = undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user