current

AccessorReadOnly

Get the current row from the query result. The current row is the one most recently stepped-to (by step() or during iteration).

Each value from the row can be accessed by index or by name.

The format of the row is dictated by the QueryOptions.rowFormat specified in the options parameter of the constructed ECSqlReader object.

current: QueryRowProxy

@see - QueryRowFormat

@note The current row is be a QueryRowProxy object. To get the row as a basic JavaScript object, call QueryRowProxy.toRow on it.

@example

const reader = iModel.createQueryReader("SELECT ECInstanceId FROM bis.Element");
while (await reader.step()) {
  // Both lines below print the same value
  console.log(reader.current[0]);
  console.log(reader.current.ecinstanceid);
}

@returns The current row as a QueryRowProxy.

Returns - QueryRowProxy

The current row as a QueryRowProxy.


Defined in

Last Updated: 16 April, 2024