2020-11-12 12:25:48 +03:00
|
|
|
- description: create an event trigger and then reset metadata
|
|
|
|
url: /v1/query
|
|
|
|
status: 200
|
|
|
|
query:
|
|
|
|
type: bulk
|
2018-12-19 09:34:27 +03:00
|
|
|
args:
|
2020-11-12 12:25:48 +03:00
|
|
|
- type: track_table
|
|
|
|
args:
|
2018-12-19 09:34:27 +03:00
|
|
|
schema: hge_tests
|
|
|
|
name: test_t1
|
2020-11-12 12:25:48 +03:00
|
|
|
- type: create_event_trigger
|
|
|
|
args: &def_args
|
|
|
|
name: t1_1
|
|
|
|
table:
|
|
|
|
schema: hge_tests
|
|
|
|
name: test_t1
|
|
|
|
insert:
|
|
|
|
columns: "*"
|
|
|
|
update:
|
|
|
|
columns: "*"
|
|
|
|
delete:
|
|
|
|
columns: "*"
|
|
|
|
webhook: http://127.0.0.1:5592
|
|
|
|
- type: insert
|
|
|
|
args:
|
|
|
|
table:
|
|
|
|
schema: hge_tests
|
|
|
|
name: test_t1
|
|
|
|
objects:
|
|
|
|
- c1: 1
|
|
|
|
c2: world
|
|
|
|
returning: []
|
|
|
|
- type: clear_metadata
|
|
|
|
args: {}
|
2018-12-19 09:34:27 +03:00
|
|
|
|
2020-11-12 12:25:48 +03:00
|
|
|
- description: ensure the event was archived
|
|
|
|
url: /v1/query
|
|
|
|
status: 200
|
|
|
|
response:
|
|
|
|
- trigger_name: t1_1
|
|
|
|
archived: true
|
|
|
|
query:
|
|
|
|
type: select
|
|
|
|
args:
|
|
|
|
table:
|
|
|
|
schema: hdb_catalog
|
|
|
|
name: event_log
|
|
|
|
columns: [trigger_name, archived]
|
|
|
|
order_by: ['-created_at']
|
|
|
|
limit: 1
|