mirror of
https://github.com/AllanWang/Frost-for-Facebook.git
synced 2024-11-10 04:52:38 +01:00
Add notifications sq
This commit is contained in:
parent
3c0a8b3fb9
commit
749c00cfde
@ -281,6 +281,7 @@ sqldelight {
|
||||
databases {
|
||||
register("FrostDb") {
|
||||
packageName.set("com.pitchedapps.frost.db")
|
||||
schemaOutputDirectory.set(file("src/main/sqldelight/databases"))
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
CREATE TABLE IF NOT EXISTS account (
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
name TEXT,
|
||||
avatar TEXT,
|
||||
facebook_cookie TEXT,
|
||||
@ -15,8 +15,10 @@ INSERT INTO account DEFAULT VALUES;
|
||||
insert:
|
||||
INSERT OR REPLACE INTO account (id, name, avatar, facebook_cookie, messenger_cookie) VALUES (?, ?, ?, ?, ?);
|
||||
|
||||
delete:
|
||||
DELETE FROM account WHERE id == ?;
|
||||
delete {
|
||||
DELETE FROM account WHERE id == (:id);
|
||||
DELETE FROM notifications WHERE id == (:id);
|
||||
}
|
||||
|
||||
select:
|
||||
SELECT *
|
||||
|
@ -0,0 +1,21 @@
|
||||
CREATE TABLE IF NOT EXISTS notifications (
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
facebook_notifications INTEGER,
|
||||
facebook_messages INTEGER,
|
||||
facebook_friends INTEGER,
|
||||
messenger_notifications INTEGER
|
||||
);
|
||||
|
||||
insertNew:
|
||||
INSERT OR IGNORE INTO notifications (id) VALUES (?);
|
||||
|
||||
insert:
|
||||
INSERT OR REPLACE INTO notifications (id,facebook_notifications, facebook_messages, facebook_friends, messenger_notifications) VALUES (?,?,?,?,?);
|
||||
|
||||
select:
|
||||
SELECT *
|
||||
FROM notifications WHERE id == ?;
|
||||
|
||||
selectAll:
|
||||
SELECT *
|
||||
FROM notifications;
|
Loading…
Reference in New Issue
Block a user