mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45:59 +00:00
fixes
This commit is contained in:
@@ -12,10 +12,6 @@
|
||||
"license": "GPL",
|
||||
"keywords": [
|
||||
"sql",
|
||||
"mssql",
|
||||
"mssql",
|
||||
"postgresql",
|
||||
"excel",
|
||||
"json",
|
||||
"import",
|
||||
"export",
|
||||
|
||||
@@ -27,7 +27,7 @@ async function loadPackageInfo(dir) {
|
||||
module.exports = {
|
||||
script_meta: 'get',
|
||||
async script({ packageName }) {
|
||||
const file = path.join(pluginsdir(), packageName, 'lib', 'frontend.js');
|
||||
const file = path.join(pluginsdir(), packageName, 'dist', 'frontend.js');
|
||||
const data = await fs.readFile(file, {
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
|
||||
@@ -18,6 +18,7 @@ class ParseStream extends stream.Transform {
|
||||
}
|
||||
if (!this.limitRows || this.rowsWritten < this.limitRows) {
|
||||
this.push(obj);
|
||||
this.rowsWritten += 1;
|
||||
}
|
||||
done();
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ function requirePlugin(packageName, requiredPlugin = null) {
|
||||
|
||||
if (requiredPlugin == null) {
|
||||
console.log('Loading module', packageName);
|
||||
const module = require(path.join(pluginsdir(), packageName, 'lib', 'backend.js'));
|
||||
const module = require(path.join(pluginsdir(), packageName, 'dist', 'backend.js'));
|
||||
requiredPlugin = module.__esModule ? module.default : module;
|
||||
}
|
||||
loadedPlugins[packageName] = requiredPlugin;
|
||||
|
||||
@@ -424,6 +424,7 @@ export abstract class GridDisplay {
|
||||
}
|
||||
|
||||
getPageQuery(offset: number, count: number) {
|
||||
if (!this.driver) return null;
|
||||
const select = this.createSelect();
|
||||
if (!select) return null;
|
||||
if (this.driver.dialect.rangeSelect) select.range = { offset: offset, limit: count };
|
||||
|
||||
@@ -50,7 +50,7 @@ export default function TableDataGrid({
|
||||
const [childCache, setChildCache] = React.useState(createGridCache());
|
||||
const [refReloadToken, setRefReloadToken] = React.useState(0);
|
||||
const [myLoadedTime, setMyLoadedTime] = React.useState(0);
|
||||
const extension = useExtensions();
|
||||
const extensions = useExtensions();
|
||||
|
||||
const { childConfig } = config;
|
||||
const setChildConfig = (value, reference = undefined) => {
|
||||
@@ -77,7 +77,7 @@ export default function TableDataGrid({
|
||||
return connection
|
||||
? new TableGridDisplay(
|
||||
{ schemaName, pureName },
|
||||
findEngineDriver(connection, extension),
|
||||
findEngineDriver(connection, extensions),
|
||||
config,
|
||||
setConfig,
|
||||
cache || myCache,
|
||||
@@ -99,7 +99,7 @@ export default function TableDataGrid({
|
||||
if (!newDisplay) return;
|
||||
if (display && display.isLoadedCorrectly && !newDisplay.isLoadedCorrectly) return;
|
||||
setDisplay(newDisplay);
|
||||
}, [connection, config, cache || myCache, conid, database, schemaName, pureName, dbinfo]);
|
||||
}, [connection, config, cache || myCache, conid, database, schemaName, pureName, dbinfo, extensions]);
|
||||
|
||||
const handleDatabaseStructureChanged = React.useCallback(() => {
|
||||
(setCache || setMyCache)(createGridCache());
|
||||
|
||||
Reference in New Issue
Block a user