View Single Post
Old 01-04-2019, 06:17 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,759
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DaltonST View Post
@UserEntityTypes are very similar to @UserCategories, but just not in the Tag Browser. UETs are psuedo-columns, just like UCs. Look in table preferences key field_metadata, and you will see that UCs are next to Custom Columns that are next to Standard Columns. In theory (but not in practice since the book-level values would be missing), I could add UETs to the Tag Browser where all of the Standard/Custom Column ETs already are. That is why I like the "@".
I can see how UETs and UCs are similar, but I see no advantage in using the same distinguishing leading character. The main significance of the '@' on a UC is its usage in search terms e.g. @Favourite Authors:true. Its usage on UETs might lead a user to think they are similarly searchable.

Quote:
Originally Posted by DaltonST View Post
I am not a Template person, do not ever use them, and do not know if they are limited to the GUI Cache, or can read metadata.db directly via APSW. A Template function in general program mode that could read a SQLite database directly would work. EM is outside of the GUI Cache entirely, since book ID is not anywhere within EM. That is its point; it is designed to be "above" book-level. So, the general program mode function would be reading from the physical database instead of the in-memory Cache for every book and every potential ET column at startup. Slow for large Libraries with many ET columns. If Templates can do it, I will write the general program mode function and make it available to copy-and-paste. However, if they cannot access APSW, then I know of no way to do what you ask. I am interested to know if they can.
My rough thinking is running along these lines:
  • In a library where I wanted to use the Entities Manager I would have to define a custom column to store a list of columns and values that have a corresponding entity: e.g.#entity_cells/Entity Cells, viz:

    Click image for larger version

Name:	1.jpg
Views:	782
Size:	40.6 KB
ID:	168840

    I chose that particular definition because I would NOT want it in the tag Browser. A individual book would only have one of these with an id that matched the book table item id. If each lookup_name:value pair had a separate row in the table with its own unique id, then it would probably make maintenance easier, but may make the icon template more difficult - so I'm assuming one per book.
  • When an entity is created, the column lookup name and value (e.g. 'publisher:Random House', '#illustrator||Clement Hurd') would be added to the book's #entity_cells list. Maintaining the list for changes and deletes would be bit tricky if its stored a single row with multiple items.
  • Then I would need to write an icon template for each column likely to have entities, that interrogated the #entity_cells column for an entry that had lookup_name and lookup_name value - i.e contains "publisher" and contains {publisher). Not sure if it would be possible to write a single template to use on any entity-able column.

    The Entity Cells column could be displayed in Book details panels. Be nice if each item appeared a separate line in a list, should be feasible with a single long text column. Should the list be sorted one asks - someone's bound to ask

    I haven't tried to map this scheme to the Entity Manager tables - my guess is that's there is considerable overlap.

BR

Last edited by BetterRed; 01-05-2019 at 01:39 AM.
BetterRed is offline   Reply With Quote