<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.deeznuts.wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AComponent_Search</id>
	<title>Template:Component Search - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.deeznuts.wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AComponent_Search"/>
	<link rel="alternate" type="text/html" href="https://wiki.deeznuts.wiki/index.php?title=Template:Component_Search&amp;action=history"/>
	<updated>2026-09-22T16:14:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.5</generator>
	<entry>
		<id>https://wiki.deeznuts.wiki/index.php?title=Template:Component_Search&amp;diff=2205&amp;oldid=prev</id>
		<title>Wvaske: Harvest DB: FLOOR the summed quantity so Banked renders as an integer</title>
		<link rel="alternate" type="text/html" href="https://wiki.deeznuts.wiki/index.php?title=Template:Component_Search&amp;diff=2205&amp;oldid=prev"/>
		<updated>2026-09-13T02:39:26Z</updated>

		<summary type="html">&lt;p&gt;Harvest DB: FLOOR the summed quantity so Banked renders as an integer&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:39, 13 September 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#cargo_query:tables=HarvestComponents=C,HarvestLog=L&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#cargo_query:tables=HarvestComponents=C,HarvestLog=L&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|join on=C.component=L.component&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|join on=C.component=L.component&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|fields=C.component=Component,SUM(L.quantity)=Banked,C.creature=Source,C.rarity=Rarity,C.cv=CV,C.effects=Effect tags,C.effect=Description,C.primary_for=Primary for,C.contributor_to=Contributor to&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|fields=C.component=Component,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;FLOOR(&lt;/ins&gt;SUM(L.quantity&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;)=Banked,C.creature=Source,C.rarity=Rarity,C.cv=CV,C.effects=Effect tags,C.effect=Description,C.primary_for=Primary for,C.contributor_to=Contributor to&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|where=(L.outcome IN (&amp;#039;Recovered&amp;#039;,&amp;#039;Spent&amp;#039;) OR L.quantity=0){{#if:{{{effects|}}}| AND ({{#ifeq:{{{match|Any}}}|All|{{#arraymap:{{{effects|}}}|,|@@@@|(C.effects HOLDS &amp;#039;@@@@&amp;#039;)|AND}}|{{#arraymap:{{{effects|}}}|,|@@@@|(C.effects HOLDS &amp;#039;@@@@&amp;#039;)|OR}}}})|}}{{#if:{{{rarity|}}}| AND C.rarity IN ({{#arraymap:{{{rarity|}}}|,|@@@@|&amp;#039;@@@@&amp;#039;|,}})|}}{{#if:{{{usable_for|}}}| AND ((C.primary_for HOLDS &amp;#039;{{{usable_for}}}&amp;#039;) OR (C.contributor_to HOLDS &amp;#039;{{{usable_for}}}&amp;#039;))|}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|where=(L.outcome IN (&amp;#039;Recovered&amp;#039;,&amp;#039;Spent&amp;#039;) OR L.quantity=0){{#if:{{{effects|}}}| AND ({{#ifeq:{{{match|Any}}}|All|{{#arraymap:{{{effects|}}}|,|@@@@|(C.effects HOLDS &amp;#039;@@@@&amp;#039;)|AND}}|{{#arraymap:{{{effects|}}}|,|@@@@|(C.effects HOLDS &amp;#039;@@@@&amp;#039;)|OR}}}})|}}{{#if:{{{rarity|}}}| AND C.rarity IN ({{#arraymap:{{{rarity|}}}|,|@@@@|&amp;#039;@@@@&amp;#039;|,}})|}}{{#if:{{{usable_for|}}}| AND ((C.primary_for HOLDS &amp;#039;{{{usable_for}}}&amp;#039;) OR (C.contributor_to HOLDS &amp;#039;{{{usable_for}}}&amp;#039;))|}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|group by=C.component&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|group by=C.component&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-2198:rev-2205:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Wvaske</name></author>
	</entry>
	<entry>
		<id>https://wiki.deeznuts.wiki/index.php?title=Template:Component_Search&amp;diff=2198&amp;oldid=prev</id>
		<title>Wvaske: Harvest DB: add the RunQuery results template — builds a Cargo query from the search form&#039;s filters</title>
		<link rel="alternate" type="text/html" href="https://wiki.deeznuts.wiki/index.php?title=Template:Component_Search&amp;diff=2198&amp;oldid=prev"/>
		<updated>2026-09-13T02:36:22Z</updated>

		<summary type="html">&lt;p&gt;Harvest DB: add the RunQuery results template — builds a Cargo query from the search form&amp;#039;s filters&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#cargo_query:tables=HarvestComponents=C,HarvestLog=L&lt;br /&gt;
|join on=C.component=L.component&lt;br /&gt;
|fields=C.component=Component,SUM(L.quantity)=Banked,C.creature=Source,C.rarity=Rarity,C.cv=CV,C.effects=Effect tags,C.effect=Description,C.primary_for=Primary for,C.contributor_to=Contributor to&lt;br /&gt;
|where=(L.outcome IN (&amp;#039;Recovered&amp;#039;,&amp;#039;Spent&amp;#039;) OR L.quantity=0){{#if:{{{effects|}}}| AND ({{#ifeq:{{{match|Any}}}|All|{{#arraymap:{{{effects|}}}|,|@@@@|(C.effects HOLDS &amp;#039;@@@@&amp;#039;)|AND}}|{{#arraymap:{{{effects|}}}|,|@@@@|(C.effects HOLDS &amp;#039;@@@@&amp;#039;)|OR}}}})|}}{{#if:{{{rarity|}}}| AND C.rarity IN ({{#arraymap:{{{rarity|}}}|,|@@@@|&amp;#039;@@@@&amp;#039;|,}})|}}{{#if:{{{usable_for|}}}| AND ((C.primary_for HOLDS &amp;#039;{{{usable_for}}}&amp;#039;) OR (C.contributor_to HOLDS &amp;#039;{{{usable_for}}}&amp;#039;))|}}&lt;br /&gt;
|group by=C.component&lt;br /&gt;
|having=SUM(L.quantity){{#ifeq:{{{banked|}}}|Yes|&amp;gt;0|&amp;gt;=0}}&lt;br /&gt;
|order by=C.cv DESC,C.component&lt;br /&gt;
|format=table&lt;br /&gt;
|limit=300&lt;br /&gt;
|default=&amp;#039;&amp;#039;No components match those filters.&amp;#039;&amp;#039;&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
Results template for the [[Form:Component Search|Component Search]] form (via &amp;lt;code&amp;gt;Special:RunQuery&amp;lt;/code&amp;gt;, embedded on [[Find Components]]). Builds a Cargo query over &amp;#039;&amp;#039;&amp;#039;HarvestComponents&amp;#039;&amp;#039;&amp;#039; joined to &amp;#039;&amp;#039;&amp;#039;HarvestLog&amp;#039;&amp;#039;&amp;#039; from the form&amp;#039;s filters:&lt;br /&gt;
* &amp;lt;code&amp;gt;effects&amp;lt;/code&amp;gt; — comma list of tags; &amp;lt;code&amp;gt;match&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;Any&amp;lt;/code&amp;gt; (default) or &amp;lt;code&amp;gt;All&amp;lt;/code&amp;gt;, assembled into &amp;lt;code&amp;gt;HOLDS&amp;lt;/code&amp;gt; clauses with &amp;lt;code&amp;gt;#arraymap&amp;lt;/code&amp;gt;. The connectives are unspaced between parenthesized clauses on purpose — parser-function arguments are whitespace-trimmed.&lt;br /&gt;
* &amp;lt;code&amp;gt;rarity&amp;lt;/code&amp;gt; — comma list, becomes an &amp;lt;code&amp;gt;IN (…)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;usable_for&amp;lt;/code&amp;gt; — one item type, matched against both &amp;lt;code&amp;gt;primary_for&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;contributor_to&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;banked&amp;lt;/code&amp;gt; — &amp;lt;code&amp;gt;Yes&amp;lt;/code&amp;gt; limits to components with net banked quantity &amp;amp;gt; 0; otherwise every known component shows with its quantity (0 = known but not held).&lt;br /&gt;
[[Category:Templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wvaske</name></author>
	</entry>
</feed>