Jump to content

Template:VerseRow: Difference between revisions

From Grantha
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
Line 1: Line 1:
<noinclude>
{{#cargo_declare: _table=Verses
| document_id  = String
| chapter_id  = String
| verse_id    = String
| verse_type  = String
| verse_text  = Text
| commentaries = List (,) of String
}}
</noinclude>
<!--
<!--
   Template:VerseRow  (refactored — shared Verses table)
   Template:VerseRow  (refactored — shared Verses table)

Revision as of 08:54, 10 March 2026


This template defines the table "Verses". View table. A replacement table has been generated for this table; View replacement table.

Usage

Called by Template:Tl automatically. Do not invoke directly.

Cargo table: Verses

One shared table for all documents. Query examples:

All verses in a chapter:

{{#cargo_query:
  tables   = Verses
| fields   = verse_id, verse_type, verse_text
| where    = chapter_id = "NNS_C01"
| order by = verse_id ASC
| format   = table
}}

All verses that have a specific commentary:

{{#cargo_query:
  tables   = Verses
| fields   = verse_id, commentaries
| where    = document_id = "NNS"
  AND commentaries HOLDS "balabodhini"
| format   = table
}}

Count commentaries per document:

{{#cargo_query:
  tables   = Verses
| fields   = document_id, COUNT(*) = total_verses
| where    = commentaries HOLDS "shankarabhashya"
| group by = document_id
| format   = table
}}