Triggers.constants.ts46 lines · main
| 1 | export const TRIGGER_EVENTS = [ |
| 2 | { value: 'INSERT', label: 'Insert', description: 'Any insert operation on the table' }, |
| 3 | { |
| 4 | value: 'UPDATE', |
| 5 | label: 'Update', |
| 6 | description: 'Any update operation of any column on the table', |
| 7 | }, |
| 8 | { value: 'DELETE', label: 'Delete', description: 'Any delete operation of a record' }, |
| 9 | ] |
| 10 | |
| 11 | export const TRIGGER_TYPES = [ |
| 12 | { |
| 13 | value: 'BEFORE', |
| 14 | label: 'Before the event', |
| 15 | description: 'Trigger fires before the operation is attempted', |
| 16 | }, |
| 17 | { |
| 18 | value: 'AFTER', |
| 19 | label: 'After the event', |
| 20 | description: 'Trigger fires before the operation has completed', |
| 21 | }, |
| 22 | ] |
| 23 | |
| 24 | export const TRIGGER_ORIENTATIONS = [ |
| 25 | { |
| 26 | value: 'ROW', |
| 27 | label: 'Row', |
| 28 | description: 'Fires once for each processed row', |
| 29 | }, |
| 30 | { |
| 31 | value: 'STATEMENT', |
| 32 | label: 'Statement', |
| 33 | description: 'Fires once for each statement', |
| 34 | }, |
| 35 | ] |
| 36 | |
| 37 | export const TRIGGER_ENABLED_MODES = [ |
| 38 | { value: 'ORIGIN', label: 'Origin', description: 'This is the default behaviour' }, |
| 39 | { |
| 40 | value: 'REPLICA', |
| 41 | label: 'Replica', |
| 42 | description: 'Will only fire if the session is in "replica" mode', |
| 43 | }, |
| 44 | { value: 'ALWAYS', label: 'Always', description: 'Will fire regardless of the replication role' }, |
| 45 | { value: 'DISABLED', label: 'Disabled', description: 'Will not fire' }, |
| 46 | ] |