Migrate local persistence from Room to SQLDelight with multiplatform support (Android+iOS); replace NoteEntity/DAO/Repository with generated SQLDelight schema, add DatabaseFactory for drivers, integrate Flow support for Compose UI updates

This commit is contained in:
2025-09-26 20:57:05 +02:00
parent a42070e36b
commit 52ffb2c958
14 changed files with 99 additions and 101 deletions

View File

@@ -0,0 +1,16 @@
CREATE TABLE notes (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
lat REAL NOT NULL,
lon REAL NOT NULL,
text TEXT NOT NULL,
createdAt INTEGER NOT NULL DEFAULT 0
);
CREATE UNIQUE INDEX notes_lat_lon_index ON notes(lat, lon);
all:
SELECT * FROM notes ORDER BY id DESC;
upsert:
INSERT OR REPLACE INTO notes(id, lat, lon, text, createdAt)
VALUES (?, ?, ?, ?, ?);