mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 20:26:00 +00:00
alter table WIP
This commit is contained in:
@@ -12,6 +12,8 @@ const dialect = {
|
||||
fallbackDataType: 'nvarchar(max)',
|
||||
explicitDropConstraint: false,
|
||||
enableConstraintsPerTable: true,
|
||||
dropColumnDependencies: ['default', 'foreignKey', 'index'],
|
||||
changeColumnDependencies: ['index'],
|
||||
anonymousPrimaryKey: false,
|
||||
quoteIdentifier(s) {
|
||||
return `[${s}]`;
|
||||
|
||||
@@ -74,7 +74,7 @@ const drivers = driverBases.map(driverBase => ({
|
||||
}
|
||||
const res = await client.query({ text: sql, rowMode: 'array' });
|
||||
const columns = extractPostgresColumns(res);
|
||||
return { rows: res.rows.map(row => zipDataRow(row, columns)), columns };
|
||||
return { rows: (res.rows || []).map(row => zipDataRow(row, columns)), columns };
|
||||
},
|
||||
stream(client, sql, options) {
|
||||
const query = new pg.Query({
|
||||
|
||||
@@ -14,8 +14,10 @@ const dialect = {
|
||||
limitSelect: true,
|
||||
rangeSelect: true,
|
||||
offsetFetchRangeSyntax: false,
|
||||
explicitDropConstraint: true,
|
||||
stringEscapeChar: "'",
|
||||
fallbackDataType: 'nvarchar(max)',
|
||||
dropColumnDependencies: ['index'],
|
||||
quoteIdentifier(s) {
|
||||
return `[${s}]`;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user