Add support for finding and counting chains #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings Arc XP, this PR including some additions for counting chains and adjustments to some queries.
Changes included
Create
help.shfile, to echo quick help to terminal. Without having to reference the available scipts elsewhere.Create
gui.shfile, to open the DuckDB Local UI, and view the "_tmpview.db" file.Add new "chain" block related scripts. That report similiar info as the "feature" scripts.
all-chains-usage.shfind-pages-by-chain-name.shdescribe-page-or-template.shThe previous counts were way to high, counting the totals from all revisions, and not just the one page.
The current counts for "Print Features" and "Print Chains" look correct to me now.
describe-page-or-template.shall-content-sources-usage.shContent Sources issue
The previous and current counts for "Print Content Sources" (for features) are always zero, regardless of the page. I believe there is a flaw in the logic for this DB query. I suspect that feature blocks don't actually store their content source service name in the root
contentServiceproperty.Instead, they are stored under the
customFieldsobject. The query would need to be updated to recursively search for thecontentServiceproperty, within all custom fields. However, my MongoDB query skills aren't very good.Feature blocks can have multiple content sources associated with them. Each having a unique custom field name.