View Single Post
Old 02-02-2015, 08:19 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,482
Karma: 8025704
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Jellby View Post
(Any fast and easy way to get a book id from an identifier other than a search, too?)
If you are doing many books at one time then I would consider getting all these "identifiers" and storing them in a dict with identifier as key and the book id as data. It might even be faster to do this even if you are doing only two or three books, given that search must scan all the records.

You can get all the values for a column using all_field_for() with book_ids == all_book_ids() then inverting the resulting dict.
chaley is offline   Reply With Quote