MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parse_create_trigger

Function parse_create_trigger

nodedb-sql/src/ddl_ast/parse/dispatch.rs:279–296  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

277
278 #[test]
279 fn parse_create_trigger() {
280 let stmt = ok(
281 "CREATE OR REPLACE SYNC TRIGGER on_insert AFTER INSERT ON orders FOR EACH ROW BEGIN RETURN; END",
282 );
283 match stmt {
284 NodedbStatement::Automation(AutomationStmt::CreateTrigger {
285 or_replace,
286 execution_mode,
287 timing,
288 ..
289 }) => {
290 assert!(or_replace);
291 assert_eq!(execution_mode, "SYNC");
292 assert_eq!(timing, "AFTER");
293 }
294 other => panic!("expected CreateTrigger, got {other:?}"),
295 }
296 }
297
298 #[test]
299 fn parse_drop_index_if_exists() {

Callers

nothing calls this directly

Calls 1

okFunction · 0.70

Tested by

no test coverage detected