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.

20 lines
626 B

  1. -- name: ListScripts :many
  2. SELECT * FROM script;
  3. -- name: SaveScript :exec
  4. REPLACE INTO script (name, data) VALUES (?, ?);
  5. -- name: ListScriptVariables :many
  6. SELECT * FROM script_variable;
  7. -- name: UpdateScriptVariables :exec
  8. REPLACE INTO script_variable (scope, name, value) VALUES (?, ?, ?);
  9. -- name: ListScriptTriggers :many
  10. SELECT * FROM script_trigger;
  11. -- name: ReplaceScriptTrigger :exec
  12. REPLACE INTO script_trigger (id, event, device_match, parameter, script_target, script_name, script_pre, script_post)
  13. VALUES (?, ?, ?, ?, ?, ?, ?, ?);
  14. -- name: DeleteScriptTrigger :exec
  15. DELETE FROM script_trigger WHERE id = ?;