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