lockserver/db/queries/locks.sql

12 lines
292 B
MySQL
Raw Normal View History

-- 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 = ?;