Jump to: navigation, search

TestPDMIndexQuery

This template is the Cargo equivalent of Template:PDMIndexDPL, providing the queries to construct the table of indexes and the individual tables for each index on the table page. It switches for ICON and GIM, because ICON currently does not display detailed information for individual indexes (the second query in this template). The second query uses the formatting template Template:TestPDMIndexQueryFormat to format the output.

This template is called by Template:TestPDMTable (for Library book pages) and Template:TestPDMTablePageFormat (for RDBMS-specific pages).

Content is:

{{#css: td.field_U {text-align: center} td.field_C {text-align: center} }}
{{#switch:{{#explode:{{{page}}}|:|1}}
|ICON={{#cargo_query:
tables=TestPDMIndexItem,TestPDMTable
|join on=TestPDMIndexItem._pageName=TestPDMTable._pageName
|fields=CONCAT( '[[Documentation:ICON:{{#explode:{{{page}}}|:|2}}:Table-',TestPDMTable.tableName,':{{#explode:{{{page}}}|:|4}}|',TestPDMTable.tableName,']]' )=Table,TestPDMIndexItem.indexName=Index Name,IF(LCASE(TestPDMIndexItem.isUnique)='yes','X','')=U,IF(LCASE(TestPDMIndexItem.cluster)='yes','X','')=C
|where=TestPDMIndexItem._pageName LIKE "Documentation:ICON:Library:Table-%%:{{#switch:{{lc:{{#sub:{{{page}}}|-5}}}}|draft|ource={{#explode:{{{page}}}|:|4}}|#default={{#switch:{{lc:{{#explode:{{{page}}}|:|4}}}}|public|current=PDMSource|#default={{#sub:{{#explode:{{{page}}}|:|4}}|0|3}}PDMSource}}}}" AND TestPDMTable.dbSchema="{{#explode:{{#explode:{{{page}}}|:|3}}|-|1}}"
|format=table
|default=No indexes are defined.
|order by=Table
|named args=yes
}}
|#default=
{{AnchorDiv|IndexList}}
==Index List==
{{#cargo_query:
tables=TestPDMIndexItem
|fields=CONCAT('[[{{{page}}}#Index_',indexName,'|',indexName,']]')=CODE,IF(LCASE(isUnique)='yes','X','')=U,IF(LCASE(cluster)='yes','X','')=C,indexDesc=Description
|where=_pageName LIKE "{{#if:{{{source|}}}|{{{source}}}|Documentation:{{#switch:{{#explode:{{{page}}}|:|1}}|PSAAS=GIM:Library:{{#explode:{{{page}}}|:|3}}:{{#switch:{{#explode:{{{page}}}|:|4}}|draft=DRAFT|Public=PDMSource}}
|#default={{#explode:{{{page}}}|:|1}}:Library:{{anchorencode:{{#explode:{{{page}}}|:|3}}}}:{{#switch:{{lc:{{#sub:{{{page}}}|-5}}}}|draft|ource={{#explode:{{{page}}}|:|4}}|#default={{#switch:{{lc:{{#explode:{{{page}}}|:|4}}}}|public|current=PDMSource|#default={{#sub:{{#explode:{{{page}}}|:|4}}|0|3}}PDMSource}}}}}}}}"
|format=table
|order by=_rowID
|default=No indexes are defined.
|named args=yes
}}
{{#cargo_query:
tables=TestPDMIndexItem
|fields=CONCAT('Index_',indexName)=anchor,indexName=indexName,indexDesc=indexDesc,indexPresentInPartitioned=indexPresentInPartitioned,indexKey=indexKey,indexKey1=indexKey1,indexKey2=indexKey2,indexKey3=indexKey3,indexKey4=indexKey4,indexKey5=indexKey5,indexKey6=indexKey6,indexKey7=indexKey7,indexKey8=indexKey8,indexKey9=indexKey9,indexKey10=indexKey10,keyPresentInNonpartitioned=keyPresentInNonpartitioned,keyPresentInNonpartitioned1=keyPresentInNonpartitioned1,keyPresentInNonpartitioned2=keyPresentInNonpartitioned2,keyPresentInNonpartitioned3=keyPresentInNonpartitioned3,keyPresentInNonpartitioned4=keyPresentInNonpartitioned4,keyPresentInNonpartitioned5=keyPresentInNonpartitioned5,keyPresentInNonpartitioned6=keyPresentInNonpartitioned6,keyPresentInNonpartitioned7=keyPresentInNonpartitioned7,keyPresentInNonpartitioned8=keyPresentInNonpartitioned8,keyPresentInNonpartitioned9=keyPresentInNonpartitioned9,keyPresentInNonpartitioned10=keyPresentInNonpartitioned10,sort=sort,sort1=sort1,sort2=sort2,sort3=sort3,sort4=sort4,sort5=sort5,sort6=sort6,sort7=sort7,sort8=sort8,sort9=sort9,sort10=sort10
|where=_pageName LIKE "{{#if:{{{source|}}}|{{{source}}}|Documentation:{{#switch:{{#explode:{{{page}}}|:|1}}|PSAAS=GIM:Library:{{#explode:{{{page}}}|:|3}}:{{#switch:{{#explode:{{{page}}}|:|4}}|draft=DRAFT|Public=PDMSource}}
|#default={{#explode:{{{page}}}|:|1}}:Library:{{anchorencode:{{#explode:{{{page}}}|:|3}}}}:{{#switch:{{lc:{{#sub:{{{page}}}|-5}}}}|draft|ource={{#explode:{{{page}}}|:|4}}|#default={{#switch:{{lc:{{#explode:{{{page}}}|:|4}}}}|public|current=PDMSource|#default={{#sub:{{#explode:{{{page}}}|:|4}}|0|3}}PDMSource}}}}}}}}"
|format=template
|template=TestPDMIndexQueryFormat
|order by=_rowID
|default=
|named args=yes
}}}}


Index List

No indexes are defined.

This page was last edited on January 2, 2020, at 23:26.
Comments or questions about this documentation? Contact us for support!