View Single Post
Old 07-28-2013, 07:53 AM   #8
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,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
If you are using the new DB then you also have access to a new template function that returns a list of virtual libraries that a book is in. The function is virtual_libraries(). A (template program mode) template that uses it is
Code:
{0:'virtual_libraries()'}
The performance of this function should be adequate if you don't have "lots" of virtual libraries. One question: is this true? Second question: how many is "lots"? I think that "lots" is more than 10 or so, and is certainly more than 50.

Note that if you sort on this column then calibre must compute the values for every book in the db, which might be slow for large libraries, although with the composite column evaluation optimizations in the new DB this effect might be not as noticeable. If you don't sort on it then the values are computed when displayed.

This function is not available in the old DB.

Last edited by chaley; 07-28-2013 at 08:23 AM. Reason: typo
chaley is offline   Reply With Quote