lockserver/db/queries/lock_log.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

5 lines
179 B
SQL

-- name: AddLogEntry :exec
INSERT INTO lock_log (lock, state, code) VALUES (?, ?, ?);
-- name: GetLogForLock :many
SELECT * FROM lock_log WHERE lock = ? ORDER BY timestamp DESC;