Finn
054008eb1f
Connects to zwave-js, syncs all locks and codeslots with database, and records an event log. No support for updating code slots.
8 lines
368 B
SQL
8 lines
368 B
SQL
-- name: UpsertCodeSlot :exec
|
|
INSERT INTO lock_code_slots (lock, slot, code, enabled, name) VALUES (?, ?, ?, ?, "") ON CONFLICT (lock, slot) DO UPDATE SET code=excluded.code, enabled=excluded.enabled;
|
|
|
|
-- name: GetLockCodeBySlot :one
|
|
SELECT * FROM lock_code_slots WHERE lock = ? AND slot = ?;
|
|
|
|
-- name: GetLockCodes :many
|
|
SELECT * FROM lock_code_slots WHERE lock = ?;
|