Delete all entries if range starts from 0.

This commit is contained in:
Arun Prakash Jana 2016-10-29 00:49:24 +05:30
parent b9fc2a37f0
commit c02651f370
No known key found for this signature in database
GPG Key ID: A75979F35C080412

4
buku
View File

@ -789,6 +789,10 @@ class BukuDb:
'''
if is_range: # Delete a range of indices
# If range starts from 0, delete all records
if low == 0:
return self.delete_all_bookmarks()
try:
query = 'DELETE from bookmarks where id BETWEEN ? AND ?'
self.cur.execute(query, (low, high))