2024-04-09 04:25:36 +00:00
|
|
|
-- name: CreateLock :one
|
|
|
|
INSERT INTO locks (zwave_device_id, name) VALUES (?, "") RETURNING *;
|
|
|
|
|
|
|
|
-- name: GetLocks :many
|
|
|
|
SELECT * FROM locks;
|
|
|
|
|
2024-04-09 23:18:43 +00:00
|
|
|
-- name: GetLock :one
|
|
|
|
SELECT * FROM locks WHERE id = ?;
|
|
|
|
|
2024-04-09 04:25:36 +00:00
|
|
|
-- name: GetLockByDeviceID :one
|
|
|
|
SELECT * FROM locks WHERE zwave_device_id = ?;
|
|
|
|
|
|
|
|
-- name: UpdateLockName :exec
|
|
|
|
UPDATE locks SET name = ? WHERE id = ?;
|