Extensions

Press shift + S to search API reference.

Model

TableOrViewQueryResult

View source

Represents a set of records directly from a view or table. See RecordQueryResult for main documentation.

Do not instantiate. You can get instances of this class by calling table.selectRecords or view.selectRecords.

Members

class TableOrViewQueryResult extends RecordQueryResult<TableOrViewQueryResultData>
readonly fieldsArray<Field> | null

The fields that were used to create this RecordQueryResult. Null if fields were not specified, which means the RecordQueryResult will load all fields in the table.

readonly idstring

The ID for this model.

readonly isDataLoadedboolean
readonly isDeletedboolean
readonly recordIdsArray<string>

The record IDs in this RecordQueryResult. Throws if data is not loaded yet. Can be watched.

readonly recordsArray<Record>

The records in this RecordQueryResult. Throws if data is not loaded yet. Can be watched.

getRecordById
function (recordId: RecordId) => Record
recordId

the ID of the Record you want

Get a specific record in the query result, or throws if that record doesn't exist or is filtered out. Throws if data is not loaded yet. Watch using 'recordIds'.

getRecordByIdIfExists
function (recordId: RecordId) => Record | null
recordId

the ID of the Record you want

Get a specific record in the query result, or null if that record doesn't exist or is filtered out. Throws if data is not loaded yet. Watch using 'recordIds'.

getRecordColor
function (recordOrRecordId: RecordId | Record) => Color | null
recordOrRecordId

the record or record ID you want the color of.

Get the Color of a specific record in the query result. Returns null if the record has no color in this query result. Throws if the record isn't in the RecordQueryResult. Watch with the 'recordColors' and 'recordIds keys.

hasRecord
function (recordOrRecordId: RecordId | Record) => boolean
recordOrRecordId

the record or record id to check the presence of

Check to see if a particular record or record id is present in this query result. Returns false if the record has been deleted or is filtered out.

loadDataAsync
function () => Promise<void>
toString
function () => string

A string representation of the model for use in debugging.

unloadData
function () => void
unwatch
function (keys: WatchableRecordQueryResultKey | ReadonlyArray<WatchableRecordQueryResultKey>, callback: FlowAnyFunction, context?: FlowAnyObject | null) => Array<WatchableRecordQueryResultKey>
watch
function (keys: WatchableRecordQueryResultKey | ReadonlyArray<WatchableRecordQueryResultKey>, callback: FlowAnyFunction, context?: FlowAnyObject | null) => Array<WatchableRecordQueryResultKey>