Open Monirzadeh opened 5 months ago
Attention: Patch coverage is 0%
with 30 lines
in your changes are missing coverage. Please review.
Project coverage is 30.56%. Comparing base (
595cb45
) to head (aaf0d16
). Report is 34 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
internal/database/mysql.go | 0.00% | 10 Missing :warning: |
internal/database/pg.go | 0.00% | 10 Missing :warning: |
internal/database/sqlite.go | 0.00% | 10 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I'm still not sold on this because it changes a foundational thing about Shiori and it may be confusing for users (that delete no longer means delete). I'd rather think in a better way for third-parties to know when some bookmarks are gone. Is knowing when a bookmark has been deleted the only remaining problem?
yes knowing deleted item is the remaining part. i thinking about different method
client may don't have all bookmarks just have part of it. for example in a database with 1000 bookmark client maybe have just 100 recently item (900 - 1000) but maybe client has bookmark id 503 (get and save that from tag search for example). what is the best method to define which one of that 101 (900-1000 plus bookmark id 503) item deleted?
i need to return something like this:
one way is that i return any missing id with something like this (it is a quick code and has some bug) what do you think?
WITH RECURSIVE range(id) AS (
SELECT 1
UNION ALL
SELECT id + 1 FROM range WHERE id < (SELECT MAX(id) FROM bookmark)
)
SELECT id
FROM range
WHERE id NOT IN (SELECT id FROM bookmark);
This PR will record deleted time with bookmark id in a seprate table. any specific unit test needed?
Why we need this?
for create a sync functionality we need to have 3 things
created_at
modifieded_at
anddeleted_at
the last one added in this PR. asdeleted_at
use case is just for sync than keep that in separate table make things cleaner.after merge #894 #896 and #903 i can finally send PR for add sync functionality to Shiori (some part of code is ready in local system). so user can sync their apps with Shiori server.