Update sqldelight-androidx-driver and remove transaction management (#3270)

`sqldelight-androidx-driver` has it's own transaction management
This commit is contained in:
AntsyLich
2026-04-27 18:24:30 +06:00
committed by GitHub
parent a2f3ec94aa
commit 8e0c911f93
28 changed files with 481 additions and 707 deletions
@@ -42,9 +42,12 @@ JOIN mangas_categories MC
ON C._id = MC.category_id
WHERE MC.manga_id = :mangaId;
insert:
INSERT INTO categories(name, sort, flags)
VALUES (:name, :order, :flags);
insert {
INSERT INTO categories(name, sort, flags)
VALUES (:name, :order, :flags);
SELECT last_insert_rowid();
}
delete:
DELETE FROM categories
@@ -60,6 +63,3 @@ WHERE _id = :categoryId;
updateAllFlags:
UPDATE categories SET
flags = coalesce(?, flags);
selectLastInsertedRowId:
SELECT last_insert_rowid();
@@ -97,10 +97,12 @@ UPDATE chapters
SET is_syncing = 0
WHERE is_syncing = 1;
insert:
INSERT INTO chapters(manga_id, url, name, scanlator, read, bookmark, last_page_read, chapter_number, source_order, date_fetch, date_upload, last_modified_at, version, is_syncing)
VALUES (:mangaId, :url, :name, :scanlator, :read, :bookmark, :lastPageRead, :chapterNumber, :sourceOrder, :dateFetch, :dateUpload, 0, :version, 0);
insert {
INSERT INTO chapters(manga_id, url, name, scanlator, read, bookmark, last_page_read, chapter_number, source_order, date_fetch, date_upload, last_modified_at, version, is_syncing)
VALUES (:mangaId, :url, :name, :scanlator, :read, :bookmark, :lastPageRead, :chapterNumber, :sourceOrder, :dateFetch, :dateUpload, 0, :version, 0);
SELECT last_insert_rowid();
}
update:
UPDATE chapters
SET manga_id = coalesce(:mangaId, manga_id),
@@ -117,6 +119,3 @@ SET manga_id = coalesce(:mangaId, manga_id),
version = coalesce(:version, version),
is_syncing = coalesce(:isSyncing, is_syncing)
WHERE _id = :chapterId;
selectLastInsertedRowId:
SELECT last_insert_rowid();
@@ -193,9 +193,12 @@ AND (
)
);
insert:
INSERT INTO mangas(source, url, artist, author, description, genre, title, status, thumbnail_url, favorite, last_update, next_update, initialized, viewer, chapter_flags, cover_last_modified, date_added, update_strategy, calculate_interval, last_modified_at, version, notes)
VALUES (:source, :url, :artist, :author, :description, :genre, :title, :status, :thumbnailUrl, :favorite, :lastUpdate, :nextUpdate, :initialized, :viewerFlags, :chapterFlags, :coverLastModified, :dateAdded, :updateStrategy, :calculateInterval, 0, :version, :notes);
insert {
INSERT INTO mangas(source, url, artist, author, description, genre, title, status, thumbnail_url, favorite, last_update, next_update, initialized, viewer, chapter_flags, cover_last_modified, date_added, update_strategy, calculate_interval, last_modified_at, version, notes)
VALUES (:source, :url, :artist, :author, :description, :genre, :title, :status, :thumbnailUrl, :favorite, :lastUpdate, :nextUpdate, :initialized, :viewerFlags, :chapterFlags, :coverLastModified, :dateAdded, :updateStrategy, :calculateInterval, 0, :version, :notes);
SELECT last_insert_rowid();
}
update:
UPDATE mangas SET
@@ -223,9 +226,6 @@ UPDATE mangas SET
notes = coalesce(:notes, notes)
WHERE _id = :mangaId;
selectLastInsertedRowId:
SELECT last_insert_rowid();
insertNetworkManga {
-- Insert the manga if it doesn't exist already
INSERT INTO mangas(