mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 16:26:00 +00:00
split postgres query
This commit is contained in:
@@ -24,23 +24,23 @@ const engineToMode = {
|
||||
postgre: 'pgsql',
|
||||
};
|
||||
|
||||
const COMMON_KEYWORDS = [
|
||||
'select',
|
||||
'where',
|
||||
'update',
|
||||
'delete',
|
||||
'group',
|
||||
'order',
|
||||
'from',
|
||||
'by',
|
||||
'create',
|
||||
'table',
|
||||
'drop',
|
||||
'alter',
|
||||
'view',
|
||||
'execute',
|
||||
'procedure',
|
||||
];
|
||||
// const COMMON_KEYWORDS = [
|
||||
// 'select',
|
||||
// 'where',
|
||||
// 'update',
|
||||
// 'delete',
|
||||
// 'group',
|
||||
// 'order',
|
||||
// 'from',
|
||||
// 'by',
|
||||
// 'create',
|
||||
// 'table',
|
||||
// 'drop',
|
||||
// 'alter',
|
||||
// 'view',
|
||||
// 'execute',
|
||||
// 'procedure',
|
||||
// ];
|
||||
|
||||
export default function SqlEditor({
|
||||
value = undefined,
|
||||
|
||||
@@ -20,6 +20,7 @@ const COMMON_KEYWORDS = [
|
||||
'execute',
|
||||
'procedure',
|
||||
'distinct',
|
||||
'go',
|
||||
];
|
||||
|
||||
export default function useCodeCompletion({ conid, database, tabVisible, currentEditorRef }) {
|
||||
@@ -111,7 +112,7 @@ export default function useCodeCompletion({ conid, database, tabVisible, current
|
||||
editor.execCommand('startAutocomplete');
|
||||
}
|
||||
|
||||
if (e.args == ' ' && /((from)|(join))\s*$/i.test(line)) {
|
||||
if (e.args == ' ' && /((from)|(join))\s*$/i.test(line)) {
|
||||
editor.execCommand('startAutocomplete');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user