Skip to main content
Version: v10.0.0

createFirestoreConstraints

Start an empty Firestore constraints chain. The adapter passes one to every queryParams callback.


Import
import { createFirestoreConstraints } from "@hyper-fetch/firebase-admin"

Parameters​

createFirestoreConstraints<Doc>()

Returns​

createFirestoreConstraints
NameTypeDescription
endAt(values)
endAt

End at these values, inclusive: one per orderBy , in order.

endBefore(values)
endBefore

End before these values, exclusive: one per orderBy , in order.

limit(limit)
limit

Limit the number of documents, like Firestore's limit() .

orderBy(field, direction)
orderBy

Order by a field, like Firestore's orderBy() . Each orderBy adds one value the cursors take.

startAfter(values)
startAfter

Start after these values, exclusive. Pass the values of the last document to load the next page.

startAt(values)
startAt

Start at these values, inclusive: one per orderBy , in order.

toJSON()
toJSON

The collected constraints, the data a request or listener stores.

where(field, operator, value)
where

Filter by a field, like Firestore's where() . The value type follows the field and the operator.