CREATE TABLE SessionData (
    userId TEXT NOT NULL PRIMARY KEY,
    deviceId TEXT NOT NULL,
    accessToken TEXT NOT NULL,
    refreshToken TEXT,
    homeserverUrl TEXT NOT NULL,
    slidingSyncProxy TEXT,
    loginTimestamp INTEGER,
    oidcData TEXT
);


selectFirst:
SELECT * FROM SessionData LIMIT 1;

selectAll:
SELECT * FROM SessionData;

selectByUserId:
SELECT * FROM SessionData WHERE userId = ?;

insertSessionData:
INSERT INTO SessionData VALUES ?;

removeSession:
DELETE FROM SessionData WHERE userId = ?;

updateSession:
REPLACE INTO SessionData VALUES ?;
