mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
00089388e1
commit
e57840f244
@ -262,14 +262,17 @@ class Notes:
|
||||
return conn.get('SELECT doc FROM notes_db.notes WHERE item=? AND colname=?', (item_id, field_name), all=False)
|
||||
|
||||
def get_note_data(self, conn, field_name, item_id):
|
||||
ans = None
|
||||
for (note_id, doc, searchable_text, ctime, mtime) in conn.execute(
|
||||
'SELECT id,doc,searchable_text,ctime,mtime FROM notes_db.notes WHERE item=? AND colname=?', (item_id, field_name)
|
||||
):
|
||||
return {
|
||||
ans = {
|
||||
'id': note_id, 'doc': doc, 'searchable_text': searchable_text,
|
||||
'ctime': ctime, 'mtime': mtime,
|
||||
'resource_hashes': frozenset(self.resources_used_by(conn, note_id)),
|
||||
}
|
||||
break
|
||||
return ans
|
||||
|
||||
def get_all_items_that_have_notes(self, conn, field_name=None):
|
||||
if field_name:
|
||||
|
Loading…
x
Reference in New Issue
Block a user