Module: TableSelect

Factory function that creates an instance of a statement to search for records in a table.
Mixes In:
See:

Methods


execute( [dataCursor] [, metadataCursor])

Executes the statement in the database that searches for all records in the table that match the given criteria. If a push-based cursor is provided, it should be used to iterate over the rows in result set. Additionally, if a metadata cursor is also provided, it should be used to iterate over each column definition.
Parameters:
Name Type Argument Description
dataCursor module:TableSelect~rowCursor <optional>
Callback function that works as push-based cursor to iterate over the result set.
metadataCursor module:TableSelect~metadataCursor <optional>
Callback function that works as push-based cursor to iterate over each column that contains values in the result set.
Returns:
A Promise that resolves to an object containing the result set returned by the statement and any other detail reported by the server. If a push-based cursor is provided, the result set will be empty.
Type
Promise.<module:RowResult>

Type Definitions


metadataCursor(metadata)

Push-based cursor type used to iterate over the column metadata in a result set returned when searching for records in a table.
Parameters:
Name Type Description
metadata Array.<Object> The list of objects containing metadata details for each column.

rowCursor(items)

Push-based cursor type used to iterate over rows in a result set returned when searching for records in a table.
Parameters:
Name Type Description
items Array.<*> The list of column values for the row in the current cursor position.