View Single Post
Old 01-15-2024, 01:53 PM   #89
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,110
Karma: 77213681
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Is there any speed difference basing a virtual library query on a composite column, or on a direct template?

Example:

#readstatus
Code:
program:
	status = readstatus();
	times = $$#timesread;

	switch_if(
		status=='currentlyreading' && times>#0, 'Currently Rereading',
		status=='currentlyreading', 'Currently Reading',
		status=='toberead' && times>#0, 'To Be Reread',
		status=='toberead', 'To Be Read',
		status=='read', 'Read',
		status=='unread' && 'readinggoal:' in $#admintags, 'Backlog',
		status=='unread', 'Unread',
		status=='didnotfinish', 'Did Not Finish',
		''
	)
Either I can use
#readstatus:"=Backlog"
or
a template search with program: readstatus()=='unread' && 'readinggoal:' in $#admintags

Last edited by ownedbycats; 01-15-2024 at 01:56 PM.
ownedbycats is offline   Reply With Quote