mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 22:16:00 +00:00
metadata loaders refactor, cache fixes
This commit is contained in:
@@ -47,7 +47,7 @@ export default function QueryTab({ tabid, conid, database, tabVisible, toolbarPo
|
||||
const editorRef = React.useRef(null);
|
||||
|
||||
useUpdateDatabaseForTab(tabVisible, conid, database);
|
||||
const connection = useConnectionInfo(conid);
|
||||
const connection = useConnectionInfo({ conid });
|
||||
|
||||
const handleChange = (text) => {
|
||||
if (text != null) queryTextRef.current = text;
|
||||
|
||||
@@ -5,7 +5,7 @@ import SqlEditor from '../sqleditor/SqlEditor';
|
||||
|
||||
export default function TableCreateScriptTab({ conid, database, schemaName, pureName }) {
|
||||
const tableInfo = useTableInfo({ conid, database, schemaName, pureName });
|
||||
const connnection = useConnectionInfo(conid);
|
||||
const connnection = useConnectionInfo({ conid });
|
||||
if (!connnection || !tableInfo) return null;
|
||||
// console.log(tableInfo);
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ export default function TableDataTab({ conid, database, schemaName, pureName, ta
|
||||
const [changeSetState, dispatchChangeSet] = useUndoReducer(createChangeSet());
|
||||
|
||||
useUpdateDatabaseForTab(tabVisible, conid, database);
|
||||
const connection = useConnectionInfo(conid);
|
||||
const connection = useConnectionInfo({ conid });
|
||||
console.log('GOT CONNECTION', connection);
|
||||
|
||||
// usePropsCompare({ tableInfo, connection, config, cache });
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import SqlEditor from '../sqleditor/SqlEditor';
|
||||
|
||||
export default function ViewCreateScriptTab({ conid, database, schemaName, pureName }) {
|
||||
const viewInfo = useViewInfo({ conid, database, schemaName, pureName });
|
||||
const connnection = useConnectionInfo(conid);
|
||||
const connnection = useConnectionInfo({ conid });
|
||||
if (!connnection || !viewInfo) return null;
|
||||
|
||||
return <SqlEditor engine={connnection && connnection.engine} value={viewInfo.createSql} readOnly />;
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function ViewDataTab({ conid, database, schemaName, pureName, tab
|
||||
const [changeSetState, dispatchChangeSet] = useUndoReducer(createChangeSet());
|
||||
|
||||
useUpdateDatabaseForTab(tabVisible, conid, database);
|
||||
const connection = useConnectionInfo(conid);
|
||||
const connection = useConnectionInfo({ conid });
|
||||
|
||||
// usePropsCompare({ tableInfo, connection, config, cache });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user