UNPKG

voluptasmollitia

Version:
29 lines (16 loc) 1.11 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/firestore](./firestore.md) &gt; [/](./firestore_.md) &gt; [getDocs](./firestore_.getdocs.md) ## getDocs() function Executes the query and returns the results as a `QuerySnapshot`<!-- -->. Note: `getDocs()` attempts to provide up-to-date data when possible by waiting for data from the server, but it may return cached data or fail if you are offline and the server cannot be reached. To specify this behavior, invoke [getDocsFromCache()](./firestore_.getdocsfromcache.md) or [getDocsFromServer()](./firestore_.getdocsfromserver.md)<!-- -->. <b>Signature:</b> ```typescript export declare function getDocs<T>(query: Query<T>): Promise<QuerySnapshot<T>>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | query | [Query](./firestore_.query.md)<!-- -->&lt;T&gt; | | <b>Returns:</b> Promise&lt;[QuerySnapshot](./firestore_.querysnapshot.md)<!-- -->&lt;T&gt;&gt; A Promise that will be resolved with the results of the query.