TestMermaid: Difference between revisions

From OODA WIKI
Jump to navigation Jump to search
AdminIsidore (talk | contribs)
AdminIsidore (talk | contribs)
No edit summary
Line 9: Line 9:
}}
}}


== Test SMW Query ==
Mermaid SMW Query Variations
Below are ten variations of the SMW query to replace the {{#ask}} block in the Sandbox page’s {{#mermaid}} code, each designed to bypass [[SMW::off]] annotations and produce valid Mermaid syntax (per https://mermaid.js.org/syntax/flowchart.html).
Variation 1: Plainlist with Minimal Parameters
{{#ask:
[[Category:Musica]] [[Musica Is component of::+]]
|?Musica Is component of
|mainlabel=-
|format=plainlist
|template=MermaidRelationship
|link=none
|limit=100
|sep=%0A
|default="No Data" --> "None"
}}
 
Purpose: Uses plainlist to output raw text, avoiding annotations.
Variation 2: Explicit Property Naming
{{#ask:
[[Category:Musica]] [[Musica Is component of::+]]
|?Musica Is component of=Target
|mainlabel=-
|format=plainlist
|template=MermaidRelationship
|link=none
|limit=100
|sep=%0A
|default="No Data" --> "None"
}}
 
Purpose: Names the property (=Target) for correct parameter passing.
Variation 3: List Format
{{#ask:
[[Category:Musica]] [[Musica Is component of::+]]
|?Musica Is component of
|mainlabel=-
|format=list
|template=MermaidRelationship
|link=none
|limit=100
|sep=%0A
|default="No Data" --> "None"
}}
 
Purpose: Tests list format for simpler output.
Variation 4: Suppress All Annotations
{{#ask:
[[Category:Musica]] [[Musica Is component of::+]]
|?Musica Is component of
|mainlabel=-
|format=plainlist
|template=MermaidRelationship
|link=none
|limit=100
|sep=%0A
|default="No Data" --> "None"
|showannotations=0
|searchlabel=
|intro=
|outro=
}}
 
Purpose: Combines all suppression parameters.
Variation 5: Suppress Property Metadata
{{#ask:
[[Category:Musica]] [[Musica Is component of::+]]
|?Musica Is component of
|mainlabel=-
|format=plainlist
|template=MermaidRelationship
|link=none
|limit=100
|sep=%0A
|default="No Data" --> "None"
|propsep=
}}
 
Purpose: Sets propsep= to suppress metadata.
Variation 6: Template Format with Intro/Outro
{{#ask:
{{#ask:
  [[Category:Musica]] [[Musica Is component of::+]]
  [[Category:Musica]] [[Musica Is component of::+]]
Line 18: Line 95:
  |link=none
  |link=none
  |limit=100
  |limit=100
  |sep=,
  |sep=%0A
  |searchlabel=
  |default="No Data" --> "None"
  |intro=
  |intro=
  |outro=
  |outro=
|showannotations=0
}}
}}
Purpose: Tests template format with minimal metadata.
Variation 7: Explicit Page and Property
{{#ask:
[[Category:Musica]] [[Musica Is component of::+]]
|mainlabel=Source
|?Musica Is component of=Target
|format=plainlist
|template=MermaidRelationship
|link=none
|limit=100
|sep=%0A
|default="No Data" --> "None"
}}
Purpose: Names page (Source) and property (Target).
Variation 8: Debug Format
{{#ask:
[[Category:Musica]] [[Musica Is component of::+]]
|?Musica Is component of
|mainlabel=-
|format=debug
|template=MermaidRelationship
|link=none
|limit=100
|sep=%0A
|default="No Data" --> "None"
}}
Purpose: Outputs raw SMW data for debugging.
Variation 9: Simplified Query
{{#ask:
[[Category:Musica]] [[Musica Is component of::+]]
|?Musica Is component of
|format=plainlist
|template=MermaidRelationship
|link=none
|limit=100
|sep=%0A
|default="No Data" --> "None"
}}
Purpose: Removes mainlabel=- to test default behavior.
Variation 10: Template Format without Separator
{{#ask:
[[Category:Musica]] [[Musica Is component of::+]]
|?Musica Is component of
|mainlabel=-
|format=template
|template=MermaidRelationship
|link=none
|limit=100
|default="No Data" --> "None"
}}
Purpose: Omits sep=%0A for default concatenation.

Revision as of 03:08, 29 August 2025

Test Mermaid

Mermaid SMW Query Variations Below are ten variations of the SMW query to replace the {{#ask}} block in the Sandbox page’s {{#mermaid}} code, each designed to bypass annotations and produce valid Mermaid syntax (per https://mermaid.js.org/syntax/flowchart.html). Variation 1: Plainlist with Minimal Parameters %0A%0A

Purpose: Uses plainlist to output raw text, avoiding annotations. Variation 2: Explicit Property Naming %0A%0A

Purpose: Names the property (=Target) for correct parameter passing. Variation 3: List Format %0A%0A

Purpose: Tests list format for simpler output. Variation 4: Suppress All Annotations %0A%0A

Purpose: Combines all suppression parameters. Variation 5: Suppress Property Metadata %0A%0A

Purpose: Sets propsep= to suppress metadata. Variation 6: Template Format with Intro/Outro %0A%0A

Purpose: Tests template format with minimal metadata. Variation 7: Explicit Page and Property Test_Annotations["Test Annotations"] --> Musica_Maneuverability_Score["Musica Maneuverability Score"];%0ATest_Annotations["Test Annotations"] --> Musica-Maneuverability-Score["Musica-Maneuverability-Score"];%0ATotal_Note_Load["Total Note Load"] --> Musica_Maneuverability_Score["Musica Maneuverability Score"];

Purpose: Names page (Source) and property (Target). Variation 8: Debug Format

Debug output SQLStore
ASK Query
[[Category:Musica]] [[Musica Is component of::+]]
SQL Query
SELECT DISTINCT
  t0.smw_id AS id,
  t0.smw_title AS t,
  t0.smw_namespace AS ns,
  t0.smw_iw AS iw,
  t0.smw_subobject AS so,
  t0.smw_sortkey AS sortkey, t0.smw_sort
FROM
  `ooda_smw_object_ids` AS t0
INNER JOIN
  (`ooda_smw_fpt_inst` AS t2
INNER JOIN
  `ooda_smw_di_wikipage` AS t4 ON t2.s_id=t4.s_id) ON t0.smw_id=t2.s_id
WHERE
  (t2.o_id=1045
   AND (t4.p_id=1122)
  )
  AND t0.smw_iw!=':smw'
  AND t0.smw_iw!=':smw-delete'
  AND t0.smw_iw!=':smw-redi'
ORDER BY
  t0.smw_sort ASC
LIMIT
  105
OFFSET
  0
SQL Explain
IDselect_typetabletypepossible_keyskeykey_lenrefrowsfilteredExtra
1SIMPLEt4refs_id, p_id, s_id_2, s_id_3p_id4const3100.00Using index; Using temporary; Using filesort
1SIMPLEt2refs_id, o_id, s_id_2, o_id_2s_id_29mediawiki.t4.s_id, const1100.00Using index
1SIMPLEt0eq_refPRIMARY, smw_id, smw_iw, smw_iw_2PRIMARY4mediawiki.t4.s_id195.60Using where
Auxilliary Tables
No auxilliary tables used.
Query Metrics
Query-Size:2
Query-Depth:1
Errors and Warnings
None

Purpose: Outputs raw SMW data for debugging. Variation 9: Simplified Query Test_Annotations["Test Annotations"] --> Musica_Maneuverability_Score["Musica Maneuverability Score"];%0ATest_Annotations["Test Annotations"] --> Musica-Maneuverability-Score["Musica-Maneuverability-Score"];%0ATotal_Note_Load["Total Note Load"] --> Musica_Maneuverability_Score["Musica Maneuverability Score"];

Purpose: Removes mainlabel=- to test default behavior. Variation 10: Template Format without Separator


Purpose: Omits sep=%0A for default concatenation.