Difference between revisions of "Template:Card query"
Dinoguy1000 (talk | contribs) (show column for Link Rating if any query results return Link Monsters (i.e. monsters with a Link Rating), instead of only if there are no monsters with a DEF (this will probably cause additional pages to break, unfortunately)) |
Dinoguy1000 (talk | contribs) (add other card types (as well as the new "playable" and "unplayable" concepts); rm "Trap-Equip" (this was changed over to regular Trap Cards with an Equip Property, ages ago)) |
||
Line 62: | Line 62: | ||
| spell = spell | | spell = spell | ||
| trap = trap | | trap = trap | ||
+ | | speedspell = speed spell | ||
| skill = skill | | skill = skill | ||
− | | | + | | ??? = ??? |
− | | | + | | character = character |
| equip = equip | | equip = equip | ||
| illusion = illusion | | illusion = illusion | ||
+ | | legendarydragon = legendary dragon | ||
| ritual = ritual | | ritual = ritual | ||
+ | | slotmachinepowerunit = slot machine power unit | ||
+ | | trapmonster = trap monster | ||
| trap-spell | trapspell | spell-trap | spelltrap = trap spell | | trap-spell | trapspell | spell-trap | spelltrap = trap spell | ||
− | | | + | | virus = virus |
− | |||
| spell/trap | s/t | nonmonster | non-monster = non-monster | | spell/trap | s/t | nonmonster | non-monster = non-monster | ||
+ | | playable = playable | ||
+ | | unplayable = unplayable | ||
+ | | nongame = non-game | ||
+ | | command = command | ||
+ | | checklist = checklist | ||
+ | | faq = faq | ||
+ | | rule = rule | ||
+ | | strategy = strategy | ||
+ | | ticket = ticket | ||
| tip = tip | | tip = tip | ||
− | |||
− | |||
| all | any = any | | all | any = any | ||
| #default = {{ #if: {{{type|}}} | {{ #vardefine: $cq_card_type_unknown | 1 }} }} | | #default = {{ #if: {{{type|}}} | {{ #vardefine: $cq_card_type_unknown | 1 }} }} | ||
Line 95: | Line 105: | ||
| spell = [[Card type::Spell Card]] | | spell = [[Card type::Spell Card]] | ||
| trap = [[Card type::Trap Card]] | | trap = [[Card type::Trap Card]] | ||
+ | | speed spell = [[Card type::Speed Spell Card]] | ||
| skill = <q>[[Card type::Skill Card]] OR [[Page type::Skill page]]</q> | | skill = <q>[[Card type::Skill Card]] OR [[Page type::Skill page]]</q> | ||
− | | | + | | ??? = [[Card type::???]] |
− | | | + | | character = [[Card type::Character Card]] |
| equip = [[Card type::Equip Card]] | | equip = [[Card type::Equip Card]] | ||
| illusion = [[Card type::Illusion Card]] | | illusion = [[Card type::Illusion Card]] | ||
+ | | legendary dragon = [[Card type::Legendary Dragon]] | ||
| ritual = [[Card type::Ritual Card]] | | ritual = [[Card type::Ritual Card]] | ||
+ | | slot machine power unit = [[Card type::Slot Machine Power Unit]] | ||
+ | | trap monster = [[Card type::Trap Monster Card]] | ||
| trap spell = [[Card type::Trap Spell Card]] | | trap spell = [[Card type::Trap Spell Card]] | ||
− | | | + | | virus = [[Card type::Virus Card]] |
− | |||
| non-monster = [[Concept:Non-monster cards]] | | non-monster = [[Concept:Non-monster cards]] | ||
+ | | playable = [[Concept:Playable cards]] | ||
+ | | unplayable = [[Concept:Unplayable cards]] | ||
+ | | non-game = [[Card type::Non-game card]] | ||
+ | | command = [[Card type::Command Card]] | ||
+ | | checklist = [[Card type::Checklist Card]] | ||
+ | | faq = [[Card type::FAQ card]] | ||
+ | | rule = [[Card type::Rule Card]] | ||
+ | | strategy = [[Card type::Strategy Card]] | ||
+ | | ticket = [[Card type::Ticket Card]] | ||
| tip = [[Card type::Tip Card]] | | tip = [[Card type::Tip Card]] | ||
− | |||
− | |||
}} | }} | ||
}}{{ #vardefine: $cq_concept_query | {{ #switch: {{ #var: $cq_medium }}/{{ #var: $cq_card_type }} | }}{{ #vardefine: $cq_concept_query | {{ #switch: {{ #var: $cq_medium }}/{{ #var: $cq_card_type }} | ||
Line 218: | Line 238: | ||
| {{ #vardefine: $cq_col_property | {{ #if: {{ #pos: {{ #var: $cq_query_lc }} | {{!((}}property:: }} | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}property::^ }} | ?Property = [[Property]] | {{ #ifeq: {{{extra_column}}} | Property | ?Property = [[Property]] }} }} | ?Property = [[Property]] }} | | {{ #vardefine: $cq_col_property | {{ #if: {{ #pos: {{ #var: $cq_query_lc }} | {{!((}}property:: }} | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}property::^ }} | ?Property = [[Property]] | {{ #ifeq: {{{extra_column}}} | Property | ?Property = [[Property]] }} }} | ?Property = [[Property]] }} | ||
}}{{ #ifeq: {{ #var: $cq_card_type }} | skill | }}{{ #ifeq: {{ #var: $cq_card_type }} | skill | ||
− | || {{ #vardefine: $cq_col_card_type_st | {{ #if: {{ #var: $cq_col_card_type }} | {{ #switch: {{ #var: $cq_card_type }} | non-monster | <!-- empty --> = {{ #var: $cq_col_card_type }} [[Card type]] }} }} | + | || {{ #vardefine: $cq_col_card_type_st | {{ #if: {{ #var: $cq_col_card_type }} | {{ #switch: {{ #var: $cq_card_type }} | non-monster | playable | unplayable | <!-- empty --> = {{ #var: $cq_col_card_type }} [[Card type]] }} }} |
}}{{ #vardefine: $cq_col_card_type_st | {{ #if: {{ #var: $cq_col_property }} | {{ #var: $cq_col_card_type_st }} }} | }}{{ #vardefine: $cq_col_card_type_st | {{ #if: {{ #var: $cq_col_property }} | {{ #var: $cq_col_card_type_st }} }} | ||
}} | }} |
Revision as of 12:09, 5 January 2024
SQLStore debug output
ASK Query
[[Card type::Monster Card]]
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,
t0.smw_title,
t0.smw_subobject
FROM
`smw_object_ids` AS t0
INNER JOIN
`smw_di_wikipage` AS t1 ON t0.smw_id=t1.s_id
WHERE
(t1.p_id='596' AND t1.o_id='1389')
AND t0.smw_iw!=':smw'
AND t0.smw_iw!=':smw-delete'
AND t0.smw_iw!=':smw-redi'
ORDER BY
t0.smw_sort ASC,
t0.smw_title ASC,
t0.smw_subobject ASC
LIMIT
55
OFFSET
0
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,
t0.smw_title,
t0.smw_subobject
FROM
`smw_object_ids` AS t0
INNER JOIN
`smw_di_wikipage` AS t1 ON t0.smw_id=t1.s_id
WHERE
(t1.p_id='596' AND t1.o_id='1389')
AND t0.smw_iw!=':smw'
AND t0.smw_iw!=':smw-delete'
AND t0.smw_iw!=':smw-redi'
ORDER BY
t0.smw_sort ASC,
t0.smw_title ASC,
t0.smw_subobject ASC
LIMIT
55
OFFSET
0
SQL Explain
ID | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
---|---|---|---|---|---|---|---|---|---|
1 | SIMPLE | t1 | ref | s_id,o_id,p_id,s_id_2,s_id_3,o_id_2,o_id_3 | o_id_2 | 5 | const | 71526 | Using where; Using temporary; Using filesort |
1 | SIMPLE | t0 | eq_ref | PRIMARY,smw_id,smw_iw,smw_iw_2 | PRIMARY | 4 | ygowiki.t1.s_id | 1 | Using where |
Auxilliary Tables
No auxilliary tables used.Query Metrics
Query-Size:2Query-Depth:1
Errors and Warnings
NoneShowing first 50 results, of 44962 total ¦ Show next 50 results ¦ Show first [20 · 50 · 100 · 250 · 500] results (all links open a new page) |
#ask
query:[[Card type::Monster Card]]
- $cq_query:
- $cq_query_lc:
- $cq_query_normalized:
- $cq_medium:
- $cq_medium_query:
- $cq_query_medium:
- $cq_card_type:
monster
- $cq_card_type_query:
[[Card type::Monster Card]]
- $cq_concept_query:
- $cq_col_card_type:
?Card type =
- $cq_col_primary_type:
?Primary type
- $cq_col_secondary_type:
?Secondary type
- $cq_col_attribute:
?Attribute = [[Attribute]]
- $cq_col_type:
?Type = [[Type]]
- $cq_col_level/rank/link:
?Stars string = [[Level]]/<br />[[Rank]]
- $cq_col_scale:
?Pendulum Scale = [[Pendulum Scale|Scale]]
- $cq_col_link_rating:
?Link Rating = [[Link Rating|Link]]
- $cq_col_atk:
?ATK string = [[ATK]]
- $cq_col_def:
?DEF string = [[DEF]]
- $cq_col_maximum_atk:
- $cq_col_card_type_st:
- $cq_col_property:
{{{extra_column}}}
:{{{extra_column2}}}
:- $cq_col_extra:
- $cq_col_extra_2:
- limit: 50
- $cq_sort:
#
- $cq_order:
- $cq_default:
- $cq_count: 44962