QueryRowSwap()
swaps one row of a query with an other.
Introduced: 6.0.0.17
QueryRowSwap( query=query, source=numeric, destination=numeric );
Returns: Query
| Argument | Description |
|---|---|
|
query
query,
required
|
edit
query object to swap rows |
|
source
numeric,
required
|
edit
The row to swap. Alias: sourceRow, src |
|
destination
numeric,
required
|
edit
The row to be swapped with. Alias: destinationRow, dest, target |
Examples
edit qry = queryNew("id,name", "integer,varchar",
[
[1, "a"],
[2, "b"],
[3, "c"]
]);
swapped = QueryRowSwap(qry,2,3)
dump(swapped);
dump(qry);
See also
- Queries
- query.rowSwap()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)