The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/database > startAt

startAt() function

Creates a QueryConstraint with the specified starting point.

Using startAt(), startAfter(), endBefore(), endAt() and equalTo() allows you to choose arbitrary starting and ending points for your queries.

The starting point is inclusive, so children with exactly the specified value will be included in the query. The optional key argument can be used to further limit the range of the query. If it is specified, then children that have exactly the specified value must also have a key name greater than or equal to the specified key.

You can read more about startAt() in Filtering data.

Signature:

export declare function startAt(value?: number | string | boolean | null, key?: string): QueryConstraint;

Parameters

Parameter Type Description
value number | string | boolean | null The value to start at. The argument type depends on which orderBy*() function was used in this query. Specify a value that matches the orderBy*() type. When used in combination with orderByKey(), the value must be a string.
key string The child key to start at. This argument is only allowed if ordering by child, value, or priority.

Returns:

QueryConstraint