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"}
        ]);
    testQuery.setRow(3, {"id"=5,"name"="alpha"});
    writeDump(testQuery);

See also