feat: add missing triggers and events factories

This commit is contained in:
Nybkox
2025-01-03 16:26:10 +01:00
parent ceb6a88964
commit 576a4fc2e5
4 changed files with 26 additions and 1 deletions

View File

@@ -2,7 +2,7 @@ const { driverBase } = global.DBGATE_PACKAGES['dbgate-tools'];
const Dumper = require('./Dumper');
const { postgreSplitterOptions } = require('dbgate-query-splitter/lib/options');
const spatialTypes = ['GEOGRAPHY','GEOMETRY'];
const spatialTypes = ['GEOGRAPHY', 'GEOMETRY'];
/** @type {import('dbgate-types').SqlDialect} */
const dialect = {
@@ -203,6 +203,13 @@ BEGIN
END
$$ LANGUAGE plpgsql;`,
},
{
label: 'New trigger',
sql: `CREATE TRIGGER trigger_name
BEFORE INSERT ON table_name
FOR EACH ROW
EXECUTE FUNCTION function_name();`,
},
];
},