feature: add sqlite kv db
This commit is contained in:
parent
3671bf1f80
commit
759aae3b54
9 changed files with 152 additions and 2 deletions
15
query.sql
Normal file
15
query.sql
Normal file
|
@ -0,0 +1,15 @@
|
|||
-- name: GetItem :one
|
||||
SELECT *
|
||||
FROM store
|
||||
WHERE id = ?
|
||||
LIMIT 1;
|
||||
|
||||
-- name: CountItems :one
|
||||
SELECT count(*)
|
||||
FROM store;
|
||||
|
||||
-- name: CreateItem :exec
|
||||
INSERT INTO store (id, data)
|
||||
VALUES (?1, ?2)
|
||||
ON CONFLICT(id)
|
||||
DO UPDATE SET data = ?2;
|
Loading…
Add table
Add a link
Reference in a new issue