query.addRow()

Adds a specified number of empty rows to a query.

query.addRow( numberOrData=any )

Returns: Query

Argument Description
numberOrData
any, optional

Number of rows to add to the query or a struct/array containing the data tp populate the row.

Examples:

  • queryAddRow(qry, 3);
  • queryAddRow(qry, ["Susi", 20] );
  • queryAddRow(qry, {name: "Susi", age: 20} );

Alias: number, data

Examples

myQuery    = queryNew( "id,name");
addedRows  = myQuery.addRow( 3 ); // will return 3

myQuery.addRow([17,'added via array notation']);

anotherRow = myQuery.addRow(); // will return 4

myQuery.addRow({ id:18, name:'added via struct notation' }); dump(myQuery);

See also