id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
firebase/queries4_417_0.txt |
citiesRef.where("state", ">=", "CA").where("population", ">", 100000);
test.firestore.js
##### Swift | |
firebase/firestore-data-filter-by-date-android-java9_29_0.txt | 4,479 1 1 gold badge 14 14 silver badges 32 32 bronze badges
asked Dec 26, 2021 at 21:06 | |
firebase/queries4_42_0.txt | * Introduction
* Get started
* Understand Cloud Firestore
* Compare Cloud Firestore and Realtime Database
* Data model
* Data types
* SDKs and client libraries
* Index types
* Database locations
* Data bundles | |
firebase/multiple-range-fields5_45_0.txt | * Overview
* Optimize your queries
* Summarize data with aggregation queries
* Paginate data with query cursors
* Access data offline
* Search with vector embeddings
* Manage indexes | |
firebase/queries4_454_0.txt | ### Web namespaced API
Not available. | |
firebase/queries4_450_0.txt | ##### C#
Snippet not available. | |
firebase/queries4_133_0.txt | * Delete User Data
* Get Started | |
firebase/multiple-range-fields5_159_0.txt | Cloud Firestore uses the leftmost fields of a composite index to satisfy the
equality constraints and the range or inequality constraint, if any, on the
first field of the ` orderBy() ` query. These constraints can reduce the
number of index entries that Cloud Firestore scans. Cloud Firestore uses the
remaining fields ... | |
firebase/firestore-data-filter-by-date-android-java9_20_0.txt | Modified 2 years, 4 months ago
Viewed 543 times | |
firebase/queries4_305_0.txt | ##### Go
cities := client.Collection("cities")
query := cities.Where("country", "in", []string{"USA", "Japan"}).Documents(ctx)
query.go | |
firebase/multiple-range-fields5_151_0.txt | ### Node.js
db.collection("users")
.where('age', '>', 35),
.where('height', '>', 60),
.where('height', '<', 70)
| |
firebase/firestore-data-filter-by-date-android-java9_30_0.txt | Khalil Laouini Khalil Laouini
33 5 5 bronze badges | |
firebase/firestore_1_1.txt | irebase.google.com/docs/cloud-messaging)
* [ In-App Messaging ](https://firebase.google.com/docs/in-app-messaging)
* [ Dynamic Links ](https://firebase.google.com/docs/dynamic-links)
* [ Google AdMob ](https://firebase.google.com/docs/admob)
* [ Google Ads ](https://firebase.google.com/docs/ads)
* [ App I... | |
firebase/firestore_3_28.txt | err == iterator.Done {
break
}
if err != nil {
log.Fatalf("Failed to iterate: %v", err)
}
fmt.Println(doc.Data())
}
[main.go](https://github.com/GoogleCloudPlatform/golang-samples/blob/65dd42e9566fea62cdb3beeb8f350f23181b1647/firestore/firestore_quickstart/main.go#L81-L91)
... | |
firebase/queries4_526_0.txt | | 4
query(collectionRef,
and( or( where("a", "==", 1), where("b", "==", 2) ),
or( where("c", "==", 3), where("d", "==", 4) )
)
)
| 4 The disjunctive normal form of this query is equal to the query above.
query(collecti... | |
firebase/queries4_198_0.txt |
// Create a reference to the cities collection
const citiesRef = db.collection('cities');
// Create a query against the collection
const allCapitalsRes = citiesRef.where('capital', '==', true);
index.js
##### Go | |
firebase/queries4_21_0.txt | * Security Rules
* App Check | |
firebase/firestore-query-filter-compound-multi-eq5_14_0.txt | * Contact Sales
* Google Cloud Developer Center | |
firebase/performance_monitoring_1_6.txt | e, you can measure how long it takes your app to
complete a specific task or set of tasks, such as loading a set of images or
querying your database. The default metric for a custom code trace is its
duration, but you can also add custom metrics, such as cache hits and memory
warnings.
In your code, you define the beg... | |
firebase/firestore_0_1.txt | irebase.google.com/docs/cloud-messaging)
* [ In-App Messaging ](https://firebase.google.com/docs/in-app-messaging)
* [ Dynamic Links ](https://firebase.google.com/docs/dynamic-links)
* [ Google AdMob ](https://firebase.google.com/docs/admob)
* [ Google Ads ](https://firebase.google.com/docs/ads)
* [ App I... | |
firebase/firestore-data-filter-by-date-android-java9_52_0.txt | #### Related
7753 | |
firebase/firestore-query-filter-compound-multi-eq5_38_0.txt | To authenticate to Firestore, set up Application Default Credentials. For more
information, see Set up authentication for a local development environment .
chained_query = cities_ref.where("state", "=", "CA").where("name", "=", "San Francisco") | |
firebase/firestore_1_4.txt | * [ Move data between projects ](/docs/firestore/manage-data/move-data)
* Read data
* [ Get data ](/docs/firestore/query-data/get-data)
* [ Get real-time updates ](/docs/firestore/query-data/listen)
* [ Perform simple and compound queries ](/docs/firestore/query-data/queries)
* [ O... | |
firebase/queries4_406_0.txt | ### Python
cities_ref = db.collection("cities")
cities_ref.where(filter=FieldFilter("state", ">=", "CA")).where(
filter=FieldFilter("state", "<=", "IN")
)
snippets.py | |
firebase/queries4_154_0.txt | ##### Java
CollectionReference cities = db.collection("cities");
List<ApiFuture<WriteResult>> futures = new ArrayList<>();
futures.add(
cities
.document("SF")
.set(
new City(
"San Francisco",
"CA",
... | |
firebase/multiple-range-fields5_121_0.txt | * Write Security Rules
* Basic Security Rules
* Avoid insecure rules
* Data validation | |
firebase/queries4_381_0.txt | ### Kotlin+KTX
citiesRef.whereEqualTo("state", "CO").whereEqualTo("name", "Denver")
citiesRef.whereEqualTo("state", "CA").whereLessThan("population", 1000000)
DocSnippets.kt | |
firebase/performance_monitoring_2_1.txt | cs/analytics)
* [ Remote Config ](https://firebase.google.com/docs/remote-config)
* [ A/B Testing ](https://firebase.google.com/docs/ab-testing)
* [ Cloud Messaging ](https://firebase.google.com/docs/cloud-messaging)
* [ In-App Messaging ](https://firebase.google.com/docs/in-app-messaging)
* [ Dynamic Lin... | |
firebase/multiple-range-fields5_67_0.txt | * Get Started
* Create a Reference
* Upload Files
* Download Files
* Use File Metadata
* Delete Files
* List Files
* Handle Errors
* Android | |
firebase/multiple-range-fields5_46_0.txt | * Secure and validate data
* Overview
* Get started
* Structure Security Rules
* Writing conditions for Security Rules
* Fix insecure rules
* Test your Security Rules
* Securely query data
* Control access per field | |
firebase/queries4_173_0.txt | ### Dart
// Create a reference to the cities collection
final citiesRef = db.collection("cities");
// Create a query against the collection.
final query = citiesRef.where("state", isEqualTo: "CA");
firestore.dart | |
firebase/firestore_1_9.txt | ple sites ](/docs/hosting/multisites)
* [ Connect a custom domain ](/docs/hosting/custom-domain)
* [ Configure hosting behavior ](/docs/hosting/full-config)
* [ Configure i18n rewrites ](/docs/hosting/i18n-rewrites)
* [ Add SDKs using reserved URLs ](/docs/hosting/reserved-urls)
* Serve dynamic... | |
firebase/firestore_1_14.txt | )
* [ Samples ](/docs/samples/)
* [ Libraries ](/docs/libraries/)
* [ GitHub ](//github.com/firebase/)
* ### Stay connected
* [ Blog ](//firebase.blog)
* [ Firebase Summit ](/summit/)
* [ Twitter ](//twitter.com/Firebase)
* [ YouTube ](//www.youtube.com/user/Firebase)
* ### Support
... | |
firebase/queries4_211_0.txt |
db.collection("cities")
.whereEqualTo("capital", true)
.get()
.addOnSuccessListener { documents ->
for (document in documents) {
Log.d(TAG, "${document.id} => ${document.data}")
}
}
.addOnFailureListener { exception ->
... | |
firebase/firestore_3_12.txt | (/docs/projects/learn-more)
* [ Supported platforms & frameworks ](/docs/libraries)
* [ Use Emulator Suite ](/docs/emulator-suite)
* [ AI assistance with Gemini in Firebase ](/docs/gemini-in-firebase)
* [ Emulator Suite ](/docs/emulator-suite)
* [ Authentication ](/docs/auth)
* [ Realtime Database ](... | |
firebase/queries4_131_0.txt | * Introduction
* Use case examples
* Use an extension in your project
* Overview
* Install an extension
* Manage installed extensions
* Permissions granted to an extension
* Manage configurations with manifests
* Extensions by Firebase | |
firebase/queries4_110_0.txt | * Introduction
* Explore use cases
* Get started
* Test, preview, then deploy
* Deploy via GitHub pull requests
* Share project resources across multiple sites
* Connect a custom domain
* Configure hosting behavior
* Configure i18n rewrites
* Add SDKs using reserved URLs... | |
firebase/queries4_55_0.txt | * Realtime Database
* Introduction
* Choose a Database
* iOS+ | |
firebase/firestore-query-filter-compound-multi-eq5_34_0.txt |
citiesRef.where('state', '==', 'CO').where('name', '==', 'Denver');
citiesRef.where('state', '==', 'CA').where('population', '<', 1000000);
### PHP | |
firebase/queries4_530_0.txt | ##### Java
db.collection("cities").whereEqualTo("country", “USA”).orderBy(“population”);
| |
firebase/queries4_293_0.txt | Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API.
citiesRef.where('country', 'in', ['USA', 'Japan']);
test.firestore.js | |
firebase/firestore_2_6.txt | ocs/database/flutter/offline-capabilities)
* Admin
* [ Get Started ](/docs/database/admin/start)
* [ Structure Data ](/docs/database/admin/structure-data)
* [ Save Data ](/docs/database/admin/save-data)
* [ Retrieve Data ](/docs/database/admin/retrieve-data)
* REST
* [ Ge... | |
firebase/queries4_66_0.txt | * Storage
* Introduction
* iOS+ | |
firebase/queries4_291_0.txt | ### Web modular API
Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API. | |
firebase/firestore-data-filter-by-date-android-java9_57_0.txt | How can I close/hide the Android soft keyboard programmatically?
4321 | |
firebase/multiple-range-fields5_82_0.txt | * Recognize text
* iOS+
* Android | |
firebase/queries4_152_0.txt | ### Java
CollectionReference cities = db.collection("cities");
Map<String, Object> data1 = new HashMap<>();
data1.put("name", "San Francisco");
data1.put("state", "CA");
data1.put("country", "USA");
data1.put("capital", false);
data1.put("population", 860000);
data1.put(... | |
firebase/multiple-range-fields5_146_0.txt | ### Swift
let query = db.collection("users")
.whereField("age", isGreaterThan: 35)
.whereField("height", isGreaterThan: 60)
.whereField("height", isLessThan: 70)
| |
firebase/queries4_165_0.txt | ### Web modular API
Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API. | |
firebase/queries4_249_0.txt | ### Web namespaced API
Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API. | |
firebase/performance_monitoring_0_3.txt | cs/app-distribution/troubleshooting)
* Related products
* [ Analytics ](//firebase.google.com/docs/analytics/)
* [ Remote Config ](//firebase.google.com/docs/remote-config/)
* [ Build ](/products-build)
* [ Release & Monitor ](/products-release)
* [ Engage ](/products-engage)
* [ Overview ](/do... | |
firebase/queries4_214_0.txt |
// asynchronously retrieve multiple documents
ApiFuture<QuerySnapshot> future = db.collection("cities").whereEqualTo("capital", true).get();
// future.get() blocks on response
List<QueryDocumentSnapshot> documents = future.get().getDocuments();
for (DocumentSnapshot document : documents) {... | |
firebase/firestore-data-filter-by-date-android-java9_23_0.txt | Firestore query documents by birthday date, like only query by day and month
exclude year? (1 answer)
Closed 2 years ago . | |
firebase/firestore-query-filter-compound-multi-eq5_13_0.txt | * Architecture Center
* Blog | |
firebase/firestore_3_17.txt | To persist data when the device loses its connection, see the [ Enable Offline
Data ](/docs/firestore/manage-data/enable-offline) documentation.
### Web namespaced API
import firebase from "firebase/app";
**import "firebase/firestore";**
// TODO: Replace the following with your app's Fireb... | |
firebase/queries4_389_0.txt | ##### Go
denverQuery := cities.Where("name", "==", "Denver").Where("state", "==", "CO")
caliQuery := cities.Where("state", "==", "CA").Where("population", "<=", 1000000)
query := cities.Where("country", "==", "USA").Where("population", ">", 5000000)
query.go | |
firebase/queries4_28_0.txt | * Dynamic Links
* Google AdMob | |
firebase/queries4_347_0.txt | ##### PHP
$containsQuery = $citiesRef->where('regions', 'array-contains-any', ['west_coast', 'east_coast']);
query_filter_array_contains_any.php | |
firebase/queries4_470_0.txt | ##### Ruby
Snippet not available. | |
firebase/queries4_432_0.txt | ##### C#
CollectionReference citiesRef = db.Collection("cities");
Query invalidRangeQuery = citiesRef
.WhereGreaterThanOrEqualTo("State", "CA")
.WhereGreaterThan("Population", 1000000);
Program.cs | |
firebase/queries4_93_0.txt | * Detect faces
* Overview
* Concepts
* iOS
* Android | |
firebase/queries4_100_0.txt | * Identify the language of text
* Overview
* iOS
* Android | |
firebase/performance_monitoring_0_4.txt | erformance of specific tasks or flows in your app, try out [
instrumenting your own custom traces of code ](/docs/perf-mon/custom-code-
traces) in your app.
## Definitions for each trace
Performance Monitoring uses method calls and notifications in your app to
determine when each type of trace starts and stops. All ... | |
firebase/queries4_240_0.txt |
cities_ref.WhereEqualTo("state", FieldValue::String("CA"));
cities_ref.WhereLessThan("population", FieldValue::Integer(100000));
cities_ref.WhereGreaterThanOrEqualTo("name",
FieldValue::String("San Francisco"));
snippets.cpp
##### Node.js | |
firebase/firestore-data-filter-by-date-android-java9_16_0.txt | Q&A for work
Connect and share knowledge within a single location that is structured and
easy to search. | |
firebase/queries4_58_0.txt | * Get Started
* Structure Data
* Read and Write Data
* Work with Lists of Data
* Enable Offline Capabilities
* Flutter | |
firebase/queries4_184_0.txt | The following query returns all the capital cities:
### Web modular API | |
firebase/firestore_2_2.txt | [ Get Started ](/docs/auth/android/start)
* [ Manage Users ](/docs/auth/android/manage-users)
* [ Password Authentication ](/docs/auth/android/password-auth)
* [ Email Link Authentication ](/docs/auth/android/email-link-auth)
* [ Google ](/docs/auth/android/google-signin)
* [ Faceboo... | |
firebase/queries4_140_0.txt | * Analytics
* Remote Config
* A/B Testing
* Cloud Messaging
* In-App Messaging
* Dynamic Links
* Google AdMob
* Google Ads
* App Indexing
Firebase is back at Google I/O on May 14! Check out the sessions. | |
firebase/multiple-range-fields5_170_0.txt | Except as otherwise noted, the content of this page is licensed under the
Creative Commons Attribution 4.0 License , and code samples are licensed
under the Apache 2.0 License . For details, see the Google Developers Site
Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024... | |
firebase/queries4_200_0.txt |
$citiesRef = $db->collection('samples/php/cities');
$query = $citiesRef->where('capital', '=', true);
$snapshot = $query->documents();
foreach ($snapshot as $document) {
printf('Document %s returned by query capital=true' . PHP_EOL, $document->id());
}
query_filter_eq_bool... | |
firebase/multiple-range-fields5_135_0.txt | * Resize Images
* Export Collections to BigQuery
* Translate Text
* Distributed Counter
* Shorten URLs
* Limit Child Nodes
* Build & publish extensions
* Overview
* Get started
* * Write functions
* Set up parameters
* Handle lifecycle events
* Add us... | |
firebase/firestore-data-filter-by-date-android-java9_55_0.txt | How do I avoid checking for nulls in Java?
4727 | |
firebase/multiple-range-fields5_158_0.txt | When optimizing indexes, note the following best practices.
#### Order index fields by equalities followed by most selective range or
inequality field | |
firebase/firestore-data-filter-by-date-android-java9_47_0.txt | * The Overflow Blog
* Upcoming research at Stack Overflow
* The reverse mullett model of software engineering | |
firebase/queries4_146_0.txt |
import { collection, doc, setDoc } from "firebase/firestore";
const citiesRef = collection(db, "cities");
await setDoc(doc(citiesRef, "SF"), {
name: "San Francisco", state: "CA", country: "USA",
capital: false, population: 860000,
regions: ["west_coast", "norcal"... | |
firebase/firestore_0_5.txt | t-practices)
* [ Map data with Swift Codable ](/docs/firestore/solutions/swift-codable-data-mapping)
* [ Understand reads and writes at scale ](/docs/firestore/understand-reads-writes-scale)
* [ Understand real-time queries at scale ](/docs/firestore/real-time_queries_at_scale)
* Cloud Firesto... | |
firebase/multiple-range-fields5_105_0.txt | * iOS
* Android
* Advanced Topics | |
firebase/queries4_181_0.txt | ##### Unity
CollectionReference citiesRef = db.Collection("cities");
Query query = citiesRef.WhereEqualTo("State", "CA");
query.GetSnapshotAsync().ContinueWithOnMainThread((querySnapshotTask) =>
{
foreach (DocumentSnapshot documentSnapshot in querySnapshotTask.Result.Documents)
... | |
firebase/performance_monitoring_4_2.txt | * [ Get started ](/docs/test-lab/ios/get-started)
* [ Run a Robo test ](/docs/test-lab/ios/robo-ux-test)
* [ Run a Robo script ](/docs/test-lab/ios/run-robo-scripts)
* [ Run a Game Loop test ](/docs/test-lab/ios/run-game-loop-test)
* [ Run an XCTest ](/docs/test-lab/ios/run-xctest)
* ... | |
firebase/queries4_359_0.txt | ### Kotlin+KTX
citiesRef.whereIn("regions", listOf(arrayOf("west_coast"), arrayOf("east_coast")))
DocSnippets.kt | |
firebase/firestore_2_7.txt | ](/docs/storage/flutter/upload-files)
* [ Download Files ](/docs/storage/flutter/download-files)
* [ Use File Metadata ](/docs/storage/flutter/file-metadata)
* [ Delete Files ](/docs/storage/flutter/delete-files)
* [ List Files ](/docs/storage/flutter/list-files)
* [ Handle Errors ](... | |
firebase/firestore-data-filter-by-date-android-java9_22_0.txt | This question already has answers here :
FireStore date query not working as expected (2 answers) | |
firebase/queries4_329_0.txt |
cities_ref = firestore.col collection_path
usr_or_japan = cities_ref.where "country", "not_in", ["USA", "Japan"]
query_data.rb
This query returns every ` city ` document where the ` country ` field exists
and is not set to ` USA ` , ` Japan ` , or ` null ` . From the example data,
this inclu... | |
firebase/queries4_370_0.txt | ##### C#
CollectionReference citiesRef = db.Collection("cities");
Query query = citiesRef.WhereIn("Regions",
new[] { new[] { "west_coast" }, new[] { "east_coast" } });
Program.cs | |
firebase/multiple-range-fields5_156_0.txt |
db.collection("employees")
.where("salary", ">", 100000)
.where("experience", ">", 0)
.orderBy("salary")
.orderBy("experience");
### Python | |
firebase/queries4_508_0.txt |
const querySnapshot = await db.collectionGroup('landmarks').where('type', '==', 'museum').get();
querySnapshot.forEach((doc) => {
console.log(doc.id, ' => ', doc.data());
});
index.js
##### Go | |
firebase/queries4_489_0.txt |
import (
"context"
"fmt"
"cloud.google.com/go/firestore"
)
// collectionGroupSetup sets up a collection group to query.
func collectionGroupSetup(projectID, cityCollection string) error {
ctx := context.Background()
client, err := firestore.NewClient(ctx... | |
firebase/queries4_161_0.txt | ##### Unity
CollectionReference citiesRef = db.Collection("cities");
citiesRef.Document("SF").SetAsync(new Dictionary<string, object>(){
{ "Name", "San Francisco" },
{ "State", "CA" },
{ "Country", "USA" },
{ "Capital", false },
{ "Population", 860000 },
... | |
firebase/queries4_263_0.txt |
Query query = citiesRef.WhereNotEqualTo("capital", false);
Query query = citiesRef.WhereNotEqualTo("capital", false);
##### C# | |
firebase/queries4_254_0.txt |
val notCapitalQuery = citiesRef.whereNotEqualTo("capital", false)
DocSnippets.kt
### Java | |
firebase/queries4_38_0.txt | * C++
* Get Started
* Manage Users
* Password Authentication
* Google
* Play Games Sign-in
* GitHub
* Facebook Login
* Sign in with Apple
* Twitter Login
* Microsoft
* Yahoo
* Phone Number
* Use a Custom Auth System
*... | |
firebase/firestore_3_23.txt | ent Libraries ](/firestore/docs/reference/libraries) .
$docRef = $db->collection('samples/php/users')->document('alovelace');
$docRef->set([
'first' => 'Ada',
'last' => 'Lovelace',
'born' => 1815
]);
printf('Added data to the lovelace document in the users collection.'... | |
firebase/firestore-query-filter-compound-multi-eq5_27_0.txt | For detailed documentation that includes this code sample, see the following:
* Perform simple and compound queries in Cloud Firestore
* Query and filter data | |
firebase/queries4_421_0.txt | ### Kotlin+KTX
citiesRef.whereGreaterThanOrEqualTo("state", "CA")
.whereGreaterThan("population", 100000)
DocSnippets.kt | |
firebase/queries4_346_0.txt | ##### Go
cities := client.Collection("cities")
query := cities.Where("regions", "array-contains-any", []string{"west_coast", "east_coast"}).Documents(ctx)
query.go | |
firebase/firestore_0_2.txt |
* [ Email Link Authentication ](/docs/auth/android/email-link-auth)
* [ Google ](/docs/auth/android/google-signin)
* [ Facebook Login ](/docs/auth/android/facebook-login)
* [ Sign in with Apple ](/docs/auth/android/apple)
* [ Twitter ](/docs/auth/android/twitter-login)
* [ GitH... | |
firebase/queries4_234_0.txt |
val stateQuery = citiesRef.whereEqualTo("state", "CA")
val populationQuery = citiesRef.whereLessThan("population", 100000)
val nameQuery = citiesRef.whereGreaterThanOrEqualTo("name", "San Francisco")
DocSnippets.kt
### Java | |
firebase/firestore-data-filter-by-date-android-java9_48_0.txt | * Featured on Meta
* Testing a new version of Stack Overflow Jobs
* Policy: Generative AI (e.g., ChatGPT) is banned | |
firebase/queries4_229_0.txt | ### Web namespaced API
Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.