Triggers.constants.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. export const TRIGGER_TYPES = [
  11. {
  12. value: 'BEFORE',
  13. label: 'Before the event',
  14. description: 'Trigger fires before the operation is attempted',
  15. },
  16. {
  17. value: 'AFTER',
  18. label: 'After the event',
  19. description: 'Trigger fires before the operation has completed',
  20. },
  21. ]
  22. export const TRIGGER_ORIENTATIONS = [
  23. {
  24. value: 'ROW',
  25. label: 'Row',
  26. description: 'Fires once for each processed row',
  27. },
  28. {
  29. value: 'STATEMENT',
  30. label: 'Statement',
  31. description: 'Fires once for each statement',
  32. },
  33. ]
  34. export const TRIGGER_ENABLED_MODES = [
  35. { value: 'ORIGIN', label: 'Origin', description: 'This is the default behaviour' },
  36. {
  37. value: 'REPLICA',
  38. label: 'Replica',
  39. description: 'Will only fire if the session is in "replica" mode',
  40. },
  41. { value: 'ALWAYS', label: 'Always', description: 'Will fire regardless of the replication role' },
  42. { value: 'DISABLED', label: 'Disabled', description: 'Will not fire' },
  43. ]