query.setRow()
Adds a row to a query, either by struct or array
Introduced: 5.3.8.120
query.setRow( rowNumber=number, rowData=any )
Returns: Boolean
Argument | Description |
---|---|
rowNumber
number,
optional
|
position of the row to updated, otherwise a new row is added Alias: row |
rowData
any,
required
|
a struct or array Alias: data |
Examples
testQuery=queryNew("id,name", "integer,varchar",
[
{"id"=1,"name"="jenifer"},
{"id"=2,"name"="ajay"},
{"id"=3,"name"="john"},
{"id"=4,"name"="smith"}
]);
<span class="nf">testQuery.setRow</span><span class="p">(</span><span class="m">3</span><span class="p">,</span> <span class="p">{</span><span class="s2">"id"</span><span class="o">=</span><span class="m">5</span><span class="p">,</span><span class="s2">"name"</span><span class="o">=</span><span class="s2">"alpha"</span><span class="p">});</span>
<span class="nf">writeDump</span><span class="p">(</span><span class="nv">testQuery</span><span class="p">);</span>