[PR #367] [MERGED] fix: update bookmark on sqlite database #575

Closed
opened 2026-02-25 23:34:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/367
Author: @fmartingr
Created: 2/13/2022
Status: Merged
Merged: 2/13/2022
Merged by: @fmartingr

Base: masterHead: fix/sqlite-update


📝 Commits (1)

  • dc1d566 fix: update bookmark on sqlite database

📊 Changes

1 file changed (+12 additions, -6 deletions)

View changed files

📝 internal/database/sqlite.go (+12 -6)

📄 Description

It used an update and insert at the same time, since the virtual table
cannot have constrants nor upserts we need to try an update the
bookmark content to check for it's existence, inserting it only if the
update fails (don't affect any rows).

This will need to be improved in the future, since not all bookmark
updates require modification of the content table (in my case, I was
testing only updating tags).

Closes: #364


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/367 **Author:** [@fmartingr](https://github.com/fmartingr) **Created:** 2/13/2022 **Status:** ✅ Merged **Merged:** 2/13/2022 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `fix/sqlite-update` --- ### 📝 Commits (1) - [`dc1d566`](https://github.com/go-shiori/shiori/commit/dc1d5669833db7edfac00ca9d2ae97424cc31ed5) fix: update bookmark on sqlite database ### 📊 Changes **1 file changed** (+12 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `internal/database/sqlite.go` (+12 -6) </details> ### 📄 Description It used an update and insert at the same time, since the virtual table cannot have constrants nor upserts we need to try an update the bookmark content to check for it's existence, inserting it only if the update fails (don't affect any rows). This will need to be improved in the future, since not all bookmark updates require modification of the content table (in my case, I was testing only updating tags). Closes: #364 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:34:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#575
No description provided.