mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-27 20:46:00 +00:00
feat: add writeTable to firebird
This commit is contained in:
@@ -43,6 +43,8 @@ const driver = {
|
|||||||
dbhan.client.query(sql, (err, result) => {
|
dbhan.client.query(sql, (err, result) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
|
console.error(err);
|
||||||
|
console.error('Executing query:', sql);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,6 +100,9 @@ const driver = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async writeTable(dbhan, name, options) {
|
||||||
|
return createBulkInsertStreamBase(this, stream, dbhan, name, options);
|
||||||
|
},
|
||||||
|
|
||||||
async script(dbhan, sql, { useTransaction } = {}) {
|
async script(dbhan, sql, { useTransaction } = {}) {
|
||||||
if (useTransaction) return this.runSqlInTransaction(dbhan, sql);
|
if (useTransaction) return this.runSqlInTransaction(dbhan, sql);
|
||||||
@@ -137,7 +142,7 @@ const driver = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async writeTable(dbhan, name, options) {
|
async writeTable(dbhan, name, options) {
|
||||||
return createBulkInsertStream(this, stream, dbhan, name, options);
|
return createBulkInsertStreamBase(this, stream, dbhan, name, options);
|
||||||
},
|
},
|
||||||
|
|
||||||
async getVersion(dbhan) {
|
async getVersion(dbhan) {
|
||||||
@@ -186,6 +191,7 @@ const driver = {
|
|||||||
transactionPromise.query(currentSql, function (err, result) {
|
transactionPromise.query(currentSql, function (err, result) {
|
||||||
if (err) {
|
if (err) {
|
||||||
logger.error(extractErrorLogData(err), 'Error executing SQL in transaction');
|
logger.error(extractErrorLogData(err), 'Error executing SQL in transaction');
|
||||||
|
logger.error({ sql: currentSql }, 'SQL that caused the error');
|
||||||
return reject(err);
|
return reject(err);
|
||||||
}
|
}
|
||||||
resolve(result);
|
resolve(result);
|
||||||
|
|||||||
Reference in New Issue
Block a user