Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitAuto: Unable to overwrite saved searches #766

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions data/src/main/sqldelight/tachiyomi/data/saved_search.sq
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ CREATE TABLE saved_search(
source INTEGER NOT NULL,
name TEXT NOT NULL,
query TEXT,
filters_json TEXT
filters_json TEXT,
UNIQUE(source, name)
);

selectBySource:
Expand All @@ -26,7 +27,7 @@ SELECT source, name
FROM saved_search;

insert:
INSERT INTO saved_search (source, name, query, filters_json)
INSERT OR REPLACE INTO saved_search (source, name, query, filters_json)
VALUES (:source, :name, :query, :filtersJson);

deleteById:
Expand All @@ -36,4 +37,4 @@ deleteAll:
DELETE FROM saved_search;

selectLastInsertedRowId:
SELECT last_insert_rowid();
SELECT last_insert_rowid();