mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-16 15:32:50 +01:00
20 lines
320 B
Plaintext
20 lines
320 B
Plaintext
|
CREATE TABLE sources(
|
||
|
_id INTEGER NOT NULL PRIMARY KEY,
|
||
|
lang TEXT NOT NULL,
|
||
|
name TEXT NOT NULL
|
||
|
);
|
||
|
|
||
|
getSourceData:
|
||
|
SELECT *
|
||
|
FROM sources
|
||
|
WHERE _id = :id;
|
||
|
|
||
|
upsert:
|
||
|
INSERT INTO sources(_id, lang, name)
|
||
|
VALUES (:id, :lang, :name)
|
||
|
ON CONFLICT(_id)
|
||
|
DO UPDATE
|
||
|
SET
|
||
|
lang = :lang,
|
||
|
name = :name
|
||
|
WHERE _id = :id;
|