mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 23:53:57 +00:00
fix: update pssql triggers test sql
This commit is contained in:
@@ -292,11 +292,11 @@ end;$$`,
|
|||||||
{
|
{
|
||||||
testName: 'triggers after each row',
|
testName: 'triggers after each row',
|
||||||
create: `CREATE TRIGGER obj1
|
create: `CREATE TRIGGER obj1
|
||||||
BEFORE INSERT ON t1
|
AFTER INSERT ON t1
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
EXECUTE FUNCTION test_function();
|
EXECUTE FUNCTION test_function();
|
||||||
`,
|
`,
|
||||||
drop: 'DROP TRIGGER obj1;',
|
drop: 'DROP TRIGGER obj1 ON t1;',
|
||||||
triggerOtherCreateSql: `CREATE OR REPLACE FUNCTION test_function()
|
triggerOtherCreateSql: `CREATE OR REPLACE FUNCTION test_function()
|
||||||
RETURNS TRIGGER AS $$
|
RETURNS TRIGGER AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
@@ -306,8 +306,8 @@ $$ LANGUAGE plpgsql;`,
|
|||||||
objectTypeField: 'triggers',
|
objectTypeField: 'triggers',
|
||||||
expected: {
|
expected: {
|
||||||
pureName: 'obj1',
|
pureName: 'obj1',
|
||||||
eventType: 'insert',
|
eventType: 'INSERT',
|
||||||
triggerTiming: 'after',
|
triggerTiming: 'AFTER',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -317,7 +317,7 @@ BEFORE INSERT ON t1
|
|||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
EXECUTE FUNCTION test_function();
|
EXECUTE FUNCTION test_function();
|
||||||
`,
|
`,
|
||||||
drop: 'DROP TRIGGER obj1;',
|
drop: 'DROP TRIGGER obj1 ON t1;',
|
||||||
triggerOtherCreateSql: `CREATE OR REPLACE FUNCTION test_function()
|
triggerOtherCreateSql: `CREATE OR REPLACE FUNCTION test_function()
|
||||||
RETURNS TRIGGER AS $$
|
RETURNS TRIGGER AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
@@ -327,8 +327,8 @@ $$ LANGUAGE plpgsql;`,
|
|||||||
objectTypeField: 'triggers',
|
objectTypeField: 'triggers',
|
||||||
expected: {
|
expected: {
|
||||||
pureName: 'obj1',
|
pureName: 'obj1',
|
||||||
eventType: 'insert',
|
eventType: 'INSERT',
|
||||||
triggerTiming: 'before',
|
triggerTiming: 'BEFORE',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -532,9 +532,9 @@ $$ LANGUAGE plpgsql;`,
|
|||||||
|
|
||||||
const filterLocal = [
|
const filterLocal = [
|
||||||
// filter local testing
|
// filter local testing
|
||||||
'MySQL',
|
// 'MySQL',
|
||||||
// '-MariaDB',
|
// '-MariaDB',
|
||||||
// '-PostgreSQL',
|
'PostgreSQL',
|
||||||
// '-SQL Server',
|
// '-SQL Server',
|
||||||
// '-SQLite',
|
// '-SQLite',
|
||||||
// '-CockroachDB',
|
// '-CockroachDB',
|
||||||
|
|||||||
Reference in New Issue
Block a user