add script triggers.

This commit is contained in:
2023-08-29 21:00:29 +02:00
parent 8776ed6df3
commit e8b77ae69c
16 changed files with 434 additions and 27 deletions
+11 -1
View File
@@ -8,4 +8,14 @@ REPLACE INTO script (name, data) VALUES (?, ?);
SELECT * FROM script_variable;
-- name: UpdateScriptVariables :exec
REPLACE INTO script_variable (scope, name, value) VALUES (?, ?, ?);
REPLACE INTO script_variable (scope, name, value) VALUES (?, ?, ?);
-- name: ListScriptTriggers :many
SELECT * FROM script_trigger;
-- name: ReplaceScriptTrigger :exec
REPLACE INTO script_trigger (id, event, device_match, parameter, script_target, script_name, script_pre, script_post)
VALUES (?, ?, ?, ?, ?, ?, ?, ?);
-- name: DeleteScriptTrigger :exec
DELETE FROM script_trigger WHERE id = ?;