lockserver/db/queries/locks.sql
Finn 054008eb1f Initial commit
Connects to zwave-js, syncs all locks and codeslots with database, and records an event log. No support for updating code slots.
2024-04-08 21:25:36 -07:00

11 lines
292 B
SQL

-- name: CreateLock :one
INSERT INTO locks (zwave_device_id, name) VALUES (?, "") RETURNING *;
-- name: GetLocks :many
SELECT * FROM locks;
-- name: GetLockByDeviceID :one
SELECT * FROM locks WHERE zwave_device_id = ?;
-- name: UpdateLockName :exec
UPDATE locks SET name = ? WHERE id = ?;