mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-27 20:46:00 +00:00
fixes
This commit is contained in:
@@ -46,11 +46,12 @@ export class SqlDumper {
|
|||||||
}
|
}
|
||||||
putValue(value) {
|
putValue(value) {
|
||||||
if (value === null) this.putRaw('NULL');
|
if (value === null) this.putRaw('NULL');
|
||||||
if (value === true) this.putRaw('1');
|
else if (value === true) this.putRaw('1');
|
||||||
if (value === false) this.putRaw('0');
|
else if (value === false) this.putRaw('0');
|
||||||
else if (_isString(value)) this.putStringValue(value);
|
else if (_isString(value)) this.putStringValue(value);
|
||||||
else if (_isNumber(value)) this.putRaw(value.toString());
|
else if (_isNumber(value)) this.putRaw(value.toString());
|
||||||
else if (_isDate(value)) this.putStringValue(new Date(value).toISOString());
|
else if (_isDate(value)) this.putStringValue(new Date(value).toISOString());
|
||||||
|
else this.putRaw('NULL');
|
||||||
}
|
}
|
||||||
putCmd(format, ...args) {
|
putCmd(format, ...args) {
|
||||||
this.put(format, ...args);
|
this.put(format, ...args);
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ export function createBulkInsertStreamBase(driver, stream, pool, name, options):
|
|||||||
}
|
}
|
||||||
dmp.putRaw(';');
|
dmp.putRaw(';');
|
||||||
// require('fs').writeFileSync('/home/jena/test.sql', dmp.s);
|
// require('fs').writeFileSync('/home/jena/test.sql', dmp.s);
|
||||||
|
// console.log(dmp.s);
|
||||||
await driver.query(pool, dmp.s);
|
await driver.query(pool, dmp.s);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
import useEditorData from '../query/useEditorData';
|
import useEditorData from '../query/useEditorData';
|
||||||
import { activeTabId, getActiveTabId, nullStore } from '../stores';
|
import { activeTabId, getActiveTabId, nullStore } from '../stores';
|
||||||
import axiosInstance from '../utility/axiosInstance';
|
import axiosInstance from '../utility/axiosInstance';
|
||||||
|
import { changeTab } from '../utility/common';
|
||||||
import memberStore from '../utility/memberStore';
|
import memberStore from '../utility/memberStore';
|
||||||
import socket from '../utility/socket';
|
import socket from '../utility/socket';
|
||||||
import useEffect from '../utility/useEffect';
|
import useEffect from '../utility/useEffect';
|
||||||
@@ -75,7 +76,12 @@
|
|||||||
domEditor?.getEditor()?.focus();
|
domEditor?.getEditor()?.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$: {
|
||||||
|
changeTab(tabid, tab => ({ ...tab, busy }));
|
||||||
|
}
|
||||||
|
|
||||||
$: effect = useEffect(() => registerRunnerDone(runnerId));
|
$: effect = useEffect(() => registerRunnerDone(runnerId));
|
||||||
|
$: $effect;
|
||||||
|
|
||||||
function registerRunnerDone(rid) {
|
function registerRunnerDone(rid) {
|
||||||
if (rid) {
|
if (rid) {
|
||||||
@@ -88,8 +94,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$: $effect;
|
|
||||||
|
|
||||||
function handleRunnerDone() {
|
function handleRunnerDone() {
|
||||||
busy = false;
|
busy = false;
|
||||||
timerLabel.stop();
|
timerLabel.stop();
|
||||||
|
|||||||
Reference in New Issue
Block a user