Query
A Query refers to a query which you can read or listen to. You can also
construct refined Query objects by adding filters and ordering.
class Query<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> { }
protected constructor();
readonly type: "query" | "collection";
withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>): Query<NewAppModelType, NewDbModelType>;
§Type Parameters
§
AppModelType = DocumentData
[src]§
DbModelType extends DocumentData = DocumentData
[src]§Properties
§
converter: FirestoreDataConverter<AppModelType, DbModelType> | null
[src]If provided, the FirestoreDataConverter associated with this instance.
§Methods
§
withConverter(converter: null): Query<DocumentData, DocumentData>
[src]Removes the current converter.
@param converter
nullremoves the current converter.
@return
A Query<DocumentData, DocumentData> that does not use a
converter.
withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>): Query<NewAppModelType, NewDbModelType>
[src]Applies a custom data converter to this query, allowing you to use your own
custom model objects with Firestore. When you call getDocs with
the returned query, the provided converter will convert between Firestore
data of type NewDbModelType and your custom type NewAppModelType.
@param converter
- Converts objects to and from Firestore.
@return
A Query that uses the provided converter.