View Single Post
Old 11-06-2018, 05:31 AM   #15
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,486
Karma: 8025704
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by masp View Post
Thanks @chaley: out of curiosity, how does the parsing work with the "comma-separated text like tags" column when "contains names" is selected? That does get parsed as a list (as indeed does the authors column), despite (or indeed due to) having ampersand as separator: ie. if I enter "bob & jane" then I see "bob" and "jane" as separate entities in the tag browser. I had hoped that because that column type could be split on "&" (with the "contains names" option selected) then so could the "behaves like tags" composite column (if that same option was available in that context).
Non-composite is-multiple columns are stored in the database as lists. When moving to/from text form, either the separator character (comma or ampersand) is added or the text is split on the separator character. It is rather rare in calibre that the text form is needed internally. Places where the list is processed can get the list directly without any parsing. The separator character is specified in the column description, and has been since custom columns were introduced.

Composite columns are not stored at all, but are computed on demand. If a list is needed then the template result is split at the separator, hard-coded as a comma. Introducing a variable separator would introduce the requirement that all list use sites to check the column description or they could break. I have no idea how many external tools, plugins, or the like would break, but I am sure it is a lot of them.
chaley is offline   Reply With Quote