id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
firebase/firestore-data-filter-by-date-android-java9_14_0.txt | ##### Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you
use most. | |
firebase/multiple-range-fields5_88_0.txt | * A/B test two versions of a model
* iOS+
* Android | |
firebase/queries4_159_0.txt | ##### Go
cities := []struct {
id string
c City
}{
{
id: "SF",
c: City{Name: "San Francisco", State: "CA", Country: "USA",
Capital: false, Population: 860000,
Regions: []string{"west_coast", "norcal"}},
},
{
id: "LA",
c: City{Name: "Los ... | |
firebase/multiple-range-fields5_14_0.txt | * Add Firebase - Server environments
* Manage Firebase projects | |
firebase/queries4_235_0.txt |
Query stateQuery = citiesRef.whereEqualTo("state", "CA");
Query populationQuery = citiesRef.whereLessThan("population", 100000);
Query nameQuery = citiesRef.whereGreaterThanOrEqualTo("name", "San Francisco");
DocSnippets.java
### Dart | |
firebase/queries4_519_0.txt | #### Disjunctive normal form
Cloud Firestore converts queries to disjunctive normal form by applying two
rules: | |
firebase/queries4_183_0.txt | ##### Ruby
cities_ref = firestore.col collection_path
query = cities_ref.where "state", "=", "CA"
query.get do |city|
puts "Document #{city.document_id} returned by query state=CA."
end
query_data.rb | |
firebase/queries4_394_0.txt | You can perform range ( ` < ` , ` <= ` , ` > ` , ` >= ` ) or not equals ( ` !=
` ) comparisons only on a single field, and you can include at most one `
array-contains ` or ` array-contains-any ` clause in a compound query:
Valid : Range filters on only one field | |
firebase/firestore-data-filter-by-date-android-java9_50_0.txt | 2
FireStore date query not working as expected | |
firebase/multiple-range-fields5_157_0.txt |
db.collection("employees")
.where("salary", ">", 100000)
.where("experience", ">", 0)
.order_by("salary")
.order_by("experience");
## Best practices for optimizing indexes | |
firebase/firestore_1_3.txt | b-auth)
* [ Facebook Login ](/docs/auth/cpp/facebook-login)
* [ Sign in with Apple ](/docs/auth/cpp/apple)
* [ Twitter Login ](/docs/auth/cpp/twitter-login)
* [ Microsoft ](/docs/auth/cpp/microsoft-oauth)
* [ Yahoo ](/docs/auth/cpp/yahoo-oauth)
* [ Phone Number ](/docs/auth/cpp... | |
firebase/queries4_176_0.txt | ### Python
# Create a reference to the cities collection
cities_ref = db.collection("cities")
# Create a query against the collection
query_ref = cities_ref.where(filter=FieldFilter("state", "==", "CA"))
snippets.py | |
firebase/queries4_435_0.txt | ### Web modular API
const q = query(citiesRef,
or(where('capital', '==', true),
where('population', '>=', 1000000)
)
);
| |
firebase/firestore_4_15.txt | erwise, you
should use stubbed data to avoid unexpected behavior.
See the [ API reference ](/docs/reference/functions/test) for similar
functions for all the other data types.
#### Using example data
If you don't need to customize the data used in the your tests, then `
firebase-functions-test ` offers methods fo... | |
firebase/queries4_331_0.txt | #### ` array-contains-any `
Use the ` array-contains-any ` operator to combine up to 30 ` array-contains
` clauses on the same field with a logical ` OR ` . An ` array-contains-any `
query returns documents where the given field is an array that contains one or
more of the comparison values: | |
firebase/queries4_12_0.txt | * Add Firebase - Web
* Add Firebase - Flutter | |
firebase/queries4_128_0.txt | * Standard Firebase services
* Cloud Functions for Firebase
* Enable enforcement
* Standard Firebase services
* Cloud Functions for Firebase
* Protect non-Firebase resources | |
firebase/queries4_59_0.txt | * Get Started
* Structure Data
* Read and Write Data
* Work with Lists of Data
* Enable Offline Capabilities
* Admin | |
firebase/firestore_3_9.txt | , then deploy ](/docs/hosting/test-preview-deploy)
* [ Deploy via GitHub pull requests ](/docs/hosting/github-integration)
* [ Share project resources across multiple sites ](/docs/hosting/multisites)
* [ Connect a custom domain ](/docs/hosting/custom-domain)
* [ Configure hosting behavior ](/docs/... | |
firebase/multiple-range-fields5_165_0.txt | While adding an ordering on ` experience ` to the query will yield the same
set of documents and obviate re-ordering the results on the clients, the query
may read many more extraneous index entries than the earlier query. This is
because Cloud Firestore always prefers an index whose index fields prefix
match the order... | |
firebase/queries4_92_0.txt | * Recognize text
* Overview
* iOS
* Android | |
firebase/firestore_0_15.txt | pport/)
* [ Stack Overflow ](//stackoverflow.com/questions/tagged/firebase)
* [ Slack community ](//firebase.community/)
* [ Google group ](//groups.google.com/forum/#!forum/firebase-talk)
* [ Release notes ](/support/releases)
* [ FAQs ](/support/faq/)
[ )
.WhereGreaterThan("population", FieldValue::Integer(100000));
snippets.cpp | |
firebase/queries4_90_0.txt | * iOS+
* Android
* Legacy Documentation | |
firebase/queries4_391_0.txt | ##### Unity
Query chainedQuery = citiesRef
.WhereEqualTo("State", "CA")
.WhereEqualTo("Name", "San Francisco"); | |
firebase/queries4_336_0.txt |
let citiesRef = db.collection("cities")
citiesRef.whereField("regions", arrayContainsAny: ["west_coast", "east_coast"])
ViewController.swift
##### Objective-C | |
firebase/queries4_416_0.txt | ### Web namespaced API
Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API. | |
firebase/queries4_315_0.txt | Note: This product is not available on watchOS and App Clip targets.
citiesRef.whereField("country", notIn: ["USA", "Japan"])
ViewController.swift | |
firebase/queries4_264_0.txt |
// Snippet not yet available
##### Ruby | |
firebase/performance_monitoring_4_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/multiple-range-fields5_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_14.txt | the Firebase BoM, you must specify each Firebase
library version in its dependency line.
**Note that if you use _multiple_ Firebase libraries in your app, we highly
recommend using the BoM to manage library versions, which ensures that all
versions are compatible. **
dependencies {
**// Declare t... | |
firebase/queries4_532_0.txt |
db.collection(“cities”).where(or(“country”, USA”), greaterThan(“population”, 250000));
The query above includes an implied order-by on the inequality and is
equivalent to the following: | |
firebase/queries4_101_0.txt | * Translate text
* Overview
* iOS
* Android
* Usage guidelines | |
firebase/queries4_94_0.txt | * Scan barcodes
* Overview
* iOS
* Android | |
firebase/multiple-range-fields5_24_0.txt | * Test Lab
* App Distribution | |
firebase/firestore-query-filter-compound-multi-eq5_5_0.txt | * Industry solutions
* Networking | |
firebase/firestore_3_19.txt | cation) .
Go to [ **IAM & admin > Service accounts **
](https://console.cloud.google.com/iam-admin/serviceaccounts) in the Google
Cloud console. Generate a new private key and save the JSON file. Then use the
file to initialize the SDK:
import firebase_admin
from firebase_admin import credentials
... | |
firebase/multiple-range-fields5_80_0.txt | * Overview
* iOS+
* Android
* Recognize landmarks | |
firebase/queries4_368_0.txt | ##### PHP
$rangeQuery = $citiesRef->where('regions', 'in', [['west_coast'], ['east_coast']]);
query_filter_in_with_array.php | |
firebase/queries4_447_0.txt | ##### Go
import (
"context"
"fmt"
"io"
firestore "cloud.google.com/go/firestore"
"google.golang.org/api/iterator"
)
func queryFilterOr(w io.Writer, projectId string) error {
// Instantiate a client
ctx := context.Background()
client, err := fires... | |
firebase/firestore_4_8.txt | /android/detect-objects-with-automl)
* [ Migrate datasets ](/docs/ml/migrate-automl-datasets)
* Advanced Topics
* A/B test two versions of a model
* [ iOS+ ](/docs/ml/ios/ab-test-models)
* [ Android ](/docs/ml/android/ab-test-models)
* Prepare for Production
* Protect your Clo... | |
firebase/queries4_355_0.txt | Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API.
citiesRef.where('regions', 'in',
[['west_coast'], ['east_coast']]);
test.firestore.js | |
firebase/performance_monitoring_2_4.txt | dencies
**implementation("com.google.firebase:firebase-perf")**
}
By using the [ Firebase Android BoM ](/docs/android/learn-more#bom) , your app
will always use compatible versions of Firebase Android libraries.
_(Alternative)_ Add Firebase library dependencies _without_ using the BoM
If you choose ... | |
firebase/queries4_492_2.txt | Query query = citiesRef.WhereIn("Country", new[] { "USA", "Japan" });
QuerySnapshot querySnapshot = await query.GetSnapshotAsync();
foreach (DocumentSnapshot documentSnapshot in querySnapshot.Documents)
{
Console.WriteLine("Document {0} retur... | |
firebase/queries4_132_0.txt | * Trigger Email
* Get started
* Use Handlebars templates
* Manage delivery status | |
firebase/queries4_308_0.txt | ##### C#
CollectionReference citiesRef = db.Collection("cities");
Query query = citiesRef.WhereIn("Country", new[] { "USA", "Japan" });
Program.cs | |
firebase/queries4_540_0.txt | * English
* Deutsch
* Español
* Español – América Latina
* Français
* Indonesia
* Italiano
* Polski
* Português
* Português – Brasil
* Tiếng Việt
* Türkçe
* Русский
* עברית
* العربيّة
* فارسی
* हिंदी
* বাংলা
* ภาษาไทย
* 中文 – 简体
* 中文 – 繁體
* 日本語
* 한국어 ... | |
firebase/queries4_344_0.txt | ##### C++
CollectionReference cities_ref = db->Collection("cities");
cities_ref.WhereArrayContainsAny("region", std::vector<FieldValue> {
FieldValue::String("west_coast"),
FieldValue::String("east_coast")
});
snippets.cpp | |
firebase/multiple-range-fields5_47_0.txt | * Solutions
* Overview
* Solutions using Firebase Extensions | |
firebase/queries4_201_0.txt |
CollectionReference citiesRef = db.Collection("cities");
Query query = citiesRef.WhereEqualTo("Capital", true);
query.GetSnapshotAsync().ContinueWithOnMainThread((querySnapshotTask) =>
{
foreach (DocumentSnapshot documentSnapshot in querySnapshotTask.Result.Documents)
{
... | |
firebase/firestore-query-filter-compound-multi-eq5_28_0.txt | ## Code sample
### C# | |
firebase/queries4_502_0.txt |
db.collectionGroup("landmarks").whereEqualTo("type", "museum").get()
.addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
@Override
public void onSuccess(QuerySnapshot queryDocumentSnapshots) {
// ...
}
}... | |
firebase/multiple-range-fields5_66_0.txt | * Storage
* Introduction
* iOS+ | |
firebase/queries4_513_0.txt |
museums = firestore.collection_group("landmarks").where("type", "==", "museum")
museums.get do |museum|
puts "#{museum[:type]} name is #{museum[:name]}."
end
query_data.rb
Before using a collection group query, you must create an index that supports
your collection group query. Yo... | |
firebase/firestore_4_12.txt | cts ](/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 Databa... | |
firebase/queries4_328_0.txt |
// Snippet not yet available
##### Ruby | |
firebase/multiple-range-fields5_152_0.txt | ## Indexing considerations
Before you start running your queries, make sure you have read about queries
and the Cloud Firestore data model . | |
firebase/multiple-range-fields5_120_0.txt | * Introduction
* Get started
* Understand Security Rules
* Security Rules language
* How Security Rules work
* Security Rules and Firebase Authentication | |
firebase/queries4_279_0.txt | ##### Java
CollectionReference citiesRef = db.collection("cities");
Query westCoastQuery = citiesRef.whereArrayContains("regions", "west_coast");
QueryDataSnippets.java | |
firebase/multiple-range-fields5_81_0.txt | * Overview
* iOS+
* Android
* Deprecated Vision SDKs | |
firebase/firestore-data-filter-by-date-android-java9_54_0.txt | Proper use cases for Android UserManager.isUserAGoat()?
4416 | |
firebase/queries4_298_0.txt | ### Java
CollectionReference citiesRef = db.collection("cities");
citiesRef.whereIn("country", Arrays.asList("USA", "Japan"));
DocSnippets.java | |
firebase/queries4_163_0.txt | ##### Ruby
cities_ref = firestore.col collection_path
cities_ref.doc("SF").set(
{
name: "San Francisco",
state: "CA",
country: "USA",
capital: false,
population: 860_000,
regions: ["west_coast", "norcal"]
}
)
cit... | |
firebase/queries4_111_0.txt | * Integrate web frameworks
* Overview
* Integrate Angular Universal
* Integrate Next.js
* Integrate Flutter
* Integrate other frameworks with Express.js | |
firebase/multiple-range-fields5_20_0.txt | * Hosting
* Cloud Functions | |
firebase/queries4_323_0.txt |
cities_ref.WhereNotIn("country", std::vector<FieldValue> {
FieldValue::String("USA"),
FieldValue::String("Japan")
});
snippets.cpp
##### Node.js | |
firebase/firestore-data-filter-by-date-android-java9_4_0.txt | * Meta Stack Overflow
### your communities | |
firebase/firestore_1_10.txt | * [ Node.js Test SDK ](/docs/reference/functions/test/test)
* [ Python ](/docs/reference/functions/2nd-gen/python)
* [ Protocol specification for https.onCall ](/docs/functions/callable-reference)
* [ Cloud Functions and Firebase ](/docs/functions/functions-and-firebase)
* [ Cloud Functions... | |
firebase/queries4_511_0.txt |
Query museums = db.CollectionGroup("landmarks").WhereEqualTo("type", "museum");
museums.GetSnapshotAsync().ContinueWithOnMainThread((querySnapshotTask) =>
{
foreach (DocumentSnapshot documentSnapshot in querySnapshotTask.Result.Documents)
{
Debug.Log(String.Format("Docu... | |
firebase/multiple-range-fields5_65_0.txt | * Understand Billing
* Realtime Database Limits
* Monitor Database Usage
* Monitor Database Performance
* Scale with Multiple Databases
* Profile Your Database
* Optimize Database Performance
* Automated Backups
* Extend with Cloud Functions
* Video series... | |
firebase/queries4_281_0.txt | ### Python
cities_ref = db.collection("cities")
query = cities_ref.where(
filter=FieldFilter("regions", "array_contains", "west_coast")
)
snippets.py | |
firebase/firestore-data-filter-by-date-android-java9_0_0.txt | Skip to main content
Stack Overflow | |
firebase/queries4_407_0.txt | ##### C++
cities_ref.WhereGreaterThanOrEqualTo("state", FieldValue::String("CA"))
.WhereLessThanOrEqualTo("state", FieldValue::String("IN"));
cities_ref.WhereEqualTo("state", FieldValue::String("CA"))
.WhereGreaterThan("population", FieldValue::Integer(1000000));
snippets.cp... | |
firebase/queries4_399_0.txt |
citiesRef
.whereField("state", isGreaterThanOrEqualTo: "CA")
.whereField("state", isLessThanOrEqualTo: "IN")
citiesRef
.whereField("state", isEqualTo: "CA")
.whereField("population", isGreaterThan: 1000000)
ViewController.swift
##### Objective-C | |
firebase/queries4_1_0.txt | * Build
* Release & Monitor | |
firebase/firestore_4_4.txt | -import)
* [ Manage data retention with time-to-live policies ](/docs/firestore/ttl)
* [ Process data in bulk with Dataflow ](/docs/firestore/dataflow-connector)
* [ Move data between projects ](/docs/firestore/manage-data/move-data)
* Read data
* [ Get data ](/docs/firestore/query-da... | |
firebase/queries4_285_0.txt | ##### PHP
$containsQuery = $citiesRef->where('regions', 'array-contains', 'west_coast');
query_filter_array_contains.php | |
firebase/queries4_517_0.txt | The following list summarizes Cloud Firestore query limitations:
* Cloud Firestore provides support for logical ` OR ` queries through the ` or ` , ` in ` , and ` array-contains-any ` operators. These queries are limited to 30 disjunctions based on the query's disjunctive normal form .
* You can use at most one... | |
firebase/firestore-data-filter-by-date-android-java9_33_0.txt | Dec 26, 2021 at 22:04
* "I looked over some solutions but didn't find exactly what I wanted" Since filtering on date has been covered multiple times already, without seeing what you already did this question is likely going to be closed as a duplicate of one of the top answers from stackoverflow.com/… | |
firebase/queries4_397_0.txt | Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API.
const q1 = citiesRef.where("state", ">=", "CA").where("state", "<=", "IN");
const q2 = citiesRef.where("state", "==", "CA").where("population", ">", 1000000);
test.firestore.js | |
firebase/queries4_537_0.txt | * ### Learn
* Guides
* Reference
* Samples
* Libraries
* GitHub
* ### Stay connected | |
firebase/queries4_65_0.txt | * Understand Billing
* Realtime Database Limits
* Monitor Database Usage
* Monitor Database Performance
* Scale with Multiple Databases
* Profile Your Database
* Optimize Database Performance
* Automated Backups
* Extend with Cloud Functions
* Video series... | |
firebase/firestore_2_15.txt | ", "label":"Easy to understand" },{ "type":
"thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type":
"thumb-up", "id": "otherUp", "label":"Other" }] Need to tell us more?
* ### Learn
* [ Guides ](/docs/guides/)
* [ Reference ](/docs/reference/)
* [ Samples ](/docs/samples/)
* ... | |
firebase/queries4_437_0.txt | ##### Swift
let query = db.collection("cities").whereFilter(Filter.orFilter([
Filter.whereField("capital", isEqualTo: true),
Filter.whereField("population", isGreaterThanOrEqualTo: 1000000);
]))
| |
firebase/multiple-range-fields5_77_0.txt | * Deploy & manage custom models
* Migrate from the legacy API
* iOS+
* Android | |
firebase/queries4_43_0.txt | * Manage databases
* Add and manage data
* Structure data
* Add data
* Transactions and batched writes
* Data contention in transaction
* Delete data
* Manage Cloud Firestore with the Firebase console
* Export and import data
* Manage data retention with... | |
firebase/queries4_18_0.txt | * Realtime Database
* Firestore | |
firebase/firestore-data-filter-by-date-android-java9_35_0.txt | Add a comment |
## 1 Answer 1 | |
firebase/multiple-range-fields5_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_288_0.txt | ##### Ruby
cities_ref = firestore.col collection_path
cities = cities_ref.where "regions", "array-contains", "west_coast"
query_data.rb | |
firebase/queries4_80_0.txt | * Overview
* iOS+
* Android
* Recognize landmarks | |
firebase/queries4_251_0.txt | Note: This product is not available on watchOS and App Clip targets.
let notEqualQuery = citiesRef.whereField("capital", isNotEqualTo: false)
ViewController.swift | |
firebase/performance_monitoring_0_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_163_0.txt | ### Node.js
const querySnapshot = await db.collection('employees')
.where("salary", ">", 100000)
.orderBy("salary")
.get();
// Order results by `experience`
| |
firebase/queries4_265_0.txt |
cities_ref = firestore.col collection_path
query = cities_ref.where "capital", "!=", false
query_data.rb
This query returns every ` city ` document where the ` capital ` field exists
with a value other than ` false ` or ` null ` . This includes ` city `
documents where the ` capital ` field ... | |
firebase/firestore-data-filter-by-date-android-java9_31_0.txt | 2
* 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.