QueryRowSwap()
swaps one row of a query with an other.
Introduced: 6.0.0.17
QueryRowSwap( query=query, source=numeric, destination=numeric );
Returns: Query
Examples
qry = queryNew("id,name", "integer,varchar",
[
[1, "a"],
[2, "b"],
[3, "c"]
]);
<span class="nv">swapped</span> <span class="o">=</span> <span class="nf">QueryRowSwap</span><span class="p">(</span><span class="nv">qry</span><span class="p">,</span><span class="m">2</span><span class="p">,</span><span class="m">3</span><span class="p">)</span>
<span class="nf">dump</span><span class="p">(</span><span class="nv">swapped</span><span class="p">);</span>
<span class="nf">dump</span><span class="p">(</span><span class="nv">qry</span><span class="p">);</span>
See also
- Queries
- query.rowSwap()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)