mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 02:36:00 +00:00
getTableFormOptions moved to dialect
This commit is contained in:
@@ -72,6 +72,26 @@ const dialect = {
|
||||
quoteIdentifier(s) {
|
||||
return `"${s}"`;
|
||||
},
|
||||
|
||||
getTableFormOptions(intent) {
|
||||
const isNewTable = intent == 'newTableForm';
|
||||
return [
|
||||
{
|
||||
type: isNewTable ? 'dropdowntext' : 'text',
|
||||
options: clickhouseEngines,
|
||||
label: 'Engine',
|
||||
name: 'tableEngine',
|
||||
sqlFormatString: '^engine = %s',
|
||||
disabled: !isNewTable,
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
label: 'Comment',
|
||||
name: 'objectComment',
|
||||
sqlFormatString: '^comment %v',
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
/** @type {import('dbgate-types').EngineDriver} */
|
||||
@@ -117,26 +137,6 @@ const driver = {
|
||||
}
|
||||
return res;
|
||||
},
|
||||
|
||||
getTableFormOptions(intent) {
|
||||
const isNewTable = intent == 'newTableForm';
|
||||
return [
|
||||
{
|
||||
type: isNewTable ? 'dropdowntext' : 'text',
|
||||
options: clickhouseEngines,
|
||||
label: 'Engine',
|
||||
name: 'tableEngine',
|
||||
sqlFormatString: '^engine = %s',
|
||||
disabled: !isNewTable,
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
label: 'Comment',
|
||||
name: 'objectComment',
|
||||
sqlFormatString: '^comment %v',
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = driver;
|
||||
|
||||
Reference in New Issue
Block a user