From bb9af5a85aa1c6f58e6d5b7c4ffe44e6dfb3684c Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 18 Dec 2018 20:05:38 +0000 Subject: [PATCH] --- devdocs/todo.txt | 6 +++++- server/AyaNova/biz/TagUtil.cs | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 2fd73451..c29bd1aa 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -84,7 +84,11 @@ TODO SERVER STUFF - so user can type first fiew characters adn select - So consistency is maintained and not sloppy multiple spellings - Maybe a db stored procedure and trigger or biz code that feeds a consolidated tag table of all entered tags in the system? - - Maybe a reference count for each tag to drive a tag cloud feature and also a order by commonality feature when offering and also to know when to remove from the tag repository when no one is using that tag anymore in any records + - Maybe a reference count for each tag to drive a tag cloud feature and also a order by commonality feature when offering and also to know when to remove from + the tag repository when no one is using that tag anymore in any records + + - TAG ROUTE: LIST route to fetch tags in Alphabetical order by name based on starts with (or maybe contains) used for quickly autofilling a list at UI level + - TAG ROUTE: CLOUD route to fetch tags in order of refcount decreasing - Boot server and seed with debug log turned on, see what is being tracked by EF that doesn't need to, seems some of that shit is being tracked. - Docs: pagingOptions, sort and filter need to be documented for API diff --git a/server/AyaNova/biz/TagUtil.cs b/server/AyaNova/biz/TagUtil.cs index cc28c999..b67f5c83 100644 --- a/server/AyaNova/biz/TagUtil.cs +++ b/server/AyaNova/biz/TagUtil.cs @@ -69,6 +69,23 @@ WHERE name = 'bill' //Catch the concurrency exception, refetch and try again a certain number of times maximum until it's resolved //maybe wrap that in a method I can re-use. + + +//Create table tags, word varchar 255, refcount longint, concurrency token +//so do this: + +//ADD / INCREMENT TAGS + +//START: Get tag word and concurrency token and count +//if not present, then add it with a count of 0 + //If that fails due to others added it or works, either way go back to START: +//UPDATE: INCREMENT the refcount and update the record + //If that fails due to a concurrency exception go to START: + + +//REMOVE / DECREMENT TAGS + + //Iterate remove tags //Fetch the tag if it exists and decrement it's ref count //Iterate addTags