mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 18:26:00 +00:00
create script callable from react
This commit is contained in:
@@ -12,14 +12,15 @@ const dialect = {
|
||||
|
||||
/** @type {import('@dbgate/types').EngineDriver} */
|
||||
const driver = {
|
||||
async connect({ mssql }, { server, port, user, password, database }) {
|
||||
const pool = await mssql.connect({
|
||||
async connect(nativeModules, { server, port, user, password, database }) {
|
||||
const pool = await nativeModules.mssql.connect({
|
||||
server,
|
||||
port,
|
||||
user,
|
||||
password,
|
||||
database
|
||||
});
|
||||
pool._nativeModules = nativeModules;
|
||||
return pool;
|
||||
},
|
||||
async query(pool, sql) {
|
||||
|
||||
Reference in New Issue
Block a user