You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
699 B
24 lines
699 B
-- name: ListScripts :many
|
|
SELECT * FROM script;
|
|
|
|
-- name: SaveScript :exec
|
|
REPLACE INTO script (name, data) VALUES (?, ?);
|
|
|
|
-- name: DeleteScript :exec
|
|
DELETE FROM script WHERE name = ?;
|
|
|
|
-- name: ListScriptVariables :many
|
|
SELECT * FROM script_variable;
|
|
|
|
-- name: UpdateScriptVariables :exec
|
|
REPLACE INTO script_variable (scope, name, value) VALUES (?, ?, ?);
|
|
|
|
-- name: ListScriptTriggers :many
|
|
SELECT * FROM script_trigger;
|
|
|
|
-- name: ReplaceScriptTrigger :exec
|
|
REPLACE INTO script_trigger (id, name, event, device_match, parameter, script_target, script_name, script_pre, script_post)
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);
|
|
|
|
-- name: DeleteScriptTrigger :exec
|
|
DELETE FROM script_trigger WHERE id = ?;
|