Split module session-storage into api and impl.
This commit is contained in:
parent
e2bd966878
commit
5ea2a4292d
15 changed files with 130 additions and 28 deletions
|
|
@ -0,0 +1,21 @@
|
|||
CREATE TABLE SessionData (
|
||||
userId TEXT NOT NULL PRIMARY KEY,
|
||||
deviceId TEXT NOT NULL,
|
||||
accessToken TEXT NOT NULL,
|
||||
refreshToken TEXT,
|
||||
homeserverUrl TEXT NOT NULL,
|
||||
isSoftLogout INTEGER AS Boolean NOT NULL DEFAULT 0,
|
||||
slidingSyncProxy TEXT
|
||||
);
|
||||
|
||||
selectFirst:
|
||||
SELECT * FROM SessionData LIMIT 1;
|
||||
|
||||
selectByUserId:
|
||||
SELECT * FROM SessionData WHERE userId = ?;
|
||||
|
||||
insertSessionData:
|
||||
INSERT INTO SessionData(userId, deviceId, accessToken, refreshToken, homeserverUrl, isSoftLogout, slidingSyncProxy) VALUES ?;
|
||||
|
||||
removeSession:
|
||||
DELETE FROM SessionData WHERE userId = ?;
|
||||
Loading…
Add table
Add a link
Reference in a new issue