TinyBase logoTinyBase

ResultRowCountListener

The ResultRowCountListener type describes a function that is used to listen to changes to the number of ResultRow objects in a query's ResultTable.

(
  queries: Queries,
  tableId: Id,
  count: number,
): void
TypeDescription
queriesQueries

A reference to the Queries object that changed.

tableIdId

The Id of the ResultTable that changed, which is also the query Id.

countnumber

The number of ResultRow objects in the ResultTable

returnsvoid

This has no return value.

A ResultRowCountListener is provided when using the addResultRowCountListener method. See that method for specific examples.

When called, a ResultRowCountListener is given a reference to the Queries object, the Id of the ResultTable whose ResultRow Ids changed (which is the same as the query Id), and the count of ResultRow objects in the ResultTable.

You can create new query definitions within the body of this listener, though obviously be aware of the possible cascading effects of doing so.

Since

v4.1.0