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

shiori delete -> "too many SQL variables" #104

Closed
Dapuva76 opened this issue Jul 29, 2018 · 4 comments
Closed

shiori delete -> "too many SQL variables" #104

Dapuva76 opened this issue Jul 29, 2018 · 4 comments

Comments

@Dapuva76
Copy link

I've imported my pocket list, and am trying to get rid of entries with a certain tag. So I've used
shiori delete $(shiori search -t tag -i)
but all I get is

too many SQL variables
Bookmark(s) have been deleted

Which deletes nothing. There are about 2000+ entries with that tag, so maybe that is confusing. Also, if I try to update all bookmarks via "shiori update", I get a bunch of "unable to retrieve" and a bunch of processed entries, but nothing changed. (manually updating works)

@RadhiFadlillah
Copy link
Collaborator

RadhiFadlillah commented Jul 31, 2018

Hi @Dapuva76 thanks for the report.

... which deletes nothing. There are about 2000+ entries with that tag

The delete command is working by deleting records in database using query like this :

DELETE * FROM bookmark WHERE id IN (?, ?, ?, ?, ..., ?);

Those ? are binding variable that will be filled with the submitted ids. The problem is, SQLite by default only allow maximum 999 binding variable. That's why it's failed when trying to delete 2000+ ids.

It's should be easy enough to fix, however right now I'm a bit busy. I think I could start working on it around next weekend, so please bear with it for now 😅.

Also, if I try to update all bookmarks via "shiori update", I get a bunch of "unable to retrieve" and a bunch of processed entries, but nothing changed.

I will investigate it further. BTW, how many bookmarks are you trying to update ? Are there more than 2000 as well ?

@Dapuva76
Copy link
Author

I will investigate it further. BTW, how many bookmarks are you trying to update ? Are there more than 2000 as well ?

Yeah, I think it's about 4k+ bookmarks. Reason being I've used scripts that scan twitter and reddit for keywords, and automatically add them to pocket. No need to hurry, I love shiori as is! Great app.

@sascha-andres
Copy link
Contributor

@RadhiFadlillah created a PR that should fix this (#123)

@RadhiFadlillah
Copy link
Collaborator

Since the ramadhan branch has been merged, this issue should be fixed now. Therefore, I will close this issue. Feel free to reopen it if the issue still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants