id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
firebase/queries4_302_0.txt | ### Python
cities_ref = db.collection("cities")
query = cities_ref.where(filter=FieldFilter("country", "in", ["USA", "Japan"]))
return query
snippets.py | |
firebase/firestore-data-filter-by-date-android-java9_53_0.txt | Is Java "pass-by-reference" or "pass-by-value"?
4025 | |
firebase/queries4_144_0.txt | ## Example data
To get started, write some data about cities so we can look at different ways
to read it back: | |
firebase/queries4_60_0.txt | * Get Started
* Structure Data
* Save Data
* Retrieve Data
* REST | |
firebase/queries4_33_0.txt | * Install, configure and integrate
* Authentication | |
firebase/multiple-range-fields5_92_0.txt | * Recognize text
* Overview
* iOS
* Android | |
firebase/queries4_345_0.txt | ##### Node.js
const coastalCities = await citiesRef.where('regions', 'array-contains-any',
['west_coast', 'east_coast']).get();
index.js | |
firebase/performance_monitoring_2_7.txt | ttps://creativecommons.org/licenses/by/4.0/) , and code samples are
licensed under the [ Apache 2.0 License
](https://www.apache.org/licenses/LICENSE-2.0) . For details, see the [ Google
Developers Site Policies ](https://developers.google.com/site-policies) . Java
is a registered trademark of Oracle and/or its affilia... | |
firebase/performance_monitoring_2_5.txt |
plugins {
// To benefit from the latest Performance Monitoring plugin features,
// update your Android Gradle plugin dependency to at least v3.4.0
id 'com.android.application' version '7.3.0' apply false
// Make sure that you have the Google services Gradle plugin dep... | |
firebase/multiple-range-fields5_74_0.txt | * Understand Security
* Get Started
* Structure Security Rules
* Write Conditions for Security Rules
* Monitor activity
* Extend with Cloud Functions
* Integrate with Google Cloud | |
firebase/queries4_332_0.txt | ### Web modular API
Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API. | |
firebase/queries4_289_0.txt | This query returns every ` city ` document where the ` regions ` field is an
array that contains ` west_coast ` . If the array has multiple instances of
the value you query on, the document is included in the results only once.
You can use at most one ` array-contains ` clause per disjunction ( ` or `
group). You can'... | |
firebase/queries4_440_0.txt | ### Java
Query query = collection.where(Filter.or(
Filter.equalTo("capital", true),
Filter.greaterThanOrEqualTo("population", 1000000)
));
| |
firebase/multiple-range-fields5_31_0.txt | * Products
* More
* Solutions
* Pricing
* Docs
* More
* Overview
* Fundamentals
* More
* Build
* More
* Release & Monitor
* More
* Engage
* More
* Reference
* Samples
* Community
* More
* Support
* Go to console
* Over... | |
firebase/performance_monitoring_4_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_27_0.txt | * Cloud Messaging
* In-App Messaging | |
firebase/multiple-range-fields5_16_0.txt | * AI assistance with Gemini in Firebase
Build | |
firebase/queries4_29_0.txt | * Google Ads
* App Indexing | |
firebase/performance_monitoring_4_4.txt | segment data by game level.
### Default attributes collected for web apps
All traces for web apps collect the following attributes by default:
* Browser
* Country
* [ Effective connection type ](//developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/effectiveType)
* Page URL
* Service worker sta... | |
firebase/queries4_78_0.txt | * Use Cloud Vision APIs
* Recognize text | |
firebase/queries4_439_0.txt | ### Kotlin+KTX
val query = collection.where(Filter.or(
Filter.equalTo("capital", true),
Filter.greaterThanOrEqualTo("population", 1000000)
))
| |
firebase/firestore-data-filter-by-date-android-java9_5_0.txt | Sign up or log in to customize your list.
### more stack exchange communities | |
firebase/queries4_507_0.txt |
db->CollectionGroup("landmarks")
.WhereEqualTo("type", FieldValue::String("museum")).Get()
.OnCompletion([](const firebase::Future<QuerySnapshot>& future) {
if (future.error() == Error::kErrorOk) {
for (const DocumentSnapshot& document : future.result()->documents()) {... | |
firebase/multiple-range-fields5_99_0.txt | * iOS
* Android
* Migrate datasets
* Natural Language | |
firebase/firestore-data-filter-by-date-android-java9_25_0.txt | And I want to show the old data (25-12-2021) and before that in another
activity.
I looked over some solutions but didn't find exactly what I wanted, any help
would be effective for me. Thank you all in advance. | |
firebase/queries4_375_0.txt | ### Web modular API
Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API. | |
firebase/queries4_326_0.txt |
$stateQuery = $citiesRef->where(
'country',
\Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter\Operator::NOT_IN,
['USA', 'Japan']
);
query_filter_not_in.php
##### Unity | |
firebase/multiple-range-fields5_137_0.txt | * Build
* Release & Monitor
* Engage
* Overview
* Fundamentals
* Build
* Release & Monitor
* Engage
* Reference
* Samples | |
firebase/firestore-query-filter-compound-multi-eq5_20_0.txt | Guides Reference Samples Resources
Contact Us Start free | |
firebase/queries4_446_0.txt | ##### Node.js
const bigCities = await citiesRef
.where(
Filter.or(
Filter.where('capital', '==', true),
Filter.where('population', '>=', 1000000)
)
)
.get();
index.js | |
firebase/queries4_333_0.txt |
import { query, where } from "firebase/firestore";
const q = query(citiesRef,
where('regions', 'array-contains-any', ['west_coast', 'east_coast']));
array_contains_any_filter.js
### Web namespaced API | |
firebase/multiple-range-fields5_102_0.txt | * Generate smart replies
* Overview
* iOS
* Android | |
firebase/queries4_403_0.txt | ### Dart
final citiesRef = db.collection("cities");
citiesRef
.where("state", isGreaterThanOrEqualTo: "CA")
.where("state", isLessThanOrEqualTo: "IN");
citiesRef
.where("state", isEqualTo: "CA")
.where("population", isGreaterThan: 1000000);
firestore.dart | |
firebase/performance_monitoring_1_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_292_0.txt |
import { query, where } from "firebase/firestore";
const q = query(citiesRef, where('country', 'in', ['USA', 'Japan']));
in_filter.js
### Web namespaced API | |
firebase/queries4_233_0.txt |
FIRQuery *stateQuery = [citiesRef queryWhereField:@"state" isEqualTo:@"CA"];
FIRQuery *populationQuery = [citiesRef queryWhereField:@"population" isLessThan:@100000];
FIRQuery *nameQuery = [citiesRef queryWhereField:@"name" isGreaterThanOrEqualTo:@"San Francisco"];
ViewController.m
### ... | |
firebase/queries4_167_0.txt | Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API.
// Create a reference to the cities collection
var citiesRef = db.collection("cities");
// Create a query against the collection.
var query = citiesRef.where("state", "==", "CA");
test.fi... | |
firebase/queries4_31_0.txt | * Products
* More
* Solutions
* Pricing
* Docs
* More
* Overview
* Fundamentals
* More
* Build
* More
* Release & Monitor
* More
* Engage
* More
* Reference
* Samples
* Community
* More
* Support
* Go to console
* Over... | |
firebase/queries4_496_0.txt | ### Web namespaced API
Learn more about the tree-shakeable modular Web API and upgrade from the
namespaced API. | |
firebase/firestore-data-filter-by-date-android-java9_68_0.txt | * Technology
* Culture & recreation
* Life & arts
* Science
* Professional
* Business
* API
* Data
* Blog
* Facebook
* Twitter
* LinkedIn
* Instagram | |
firebase/firestore_3_22.txt | ic void onFailure(@NonNull Exception e) {
Log.w(TAG, "Error adding document", e);
}
});
[DocSnippets.java](https://github.com/firebase/snippets-android/blob/958196be8f0c87f5a9c61d58870c616e2cc9645f/firestore/app/src/main/java/com/google/example/firestore/DocSnipp... | |
firebase/firestore-query-filter-compound-multi-eq5_18_0.txt | * Google Cloud Tech Youtube Channel
* English
* Deutsch
* Español – América Latina
* Français
* Indonesia
* Italiano
* Português – Brasil
* 中文 – 简体
* 日本語
* 한국어 | |
firebase/firestore-query-filter-compound-multi-eq5_19_0.txt | Sign in
* Firestore | |
firebase/queries4_536_0.txt | Last updated 2024-04-30 UTC.
[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing
the information I need" },{ "type": "thumb-down", "id":
"tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{
"type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type":
"thu... | |
firebase/queries4_365_0.txt | ##### C++
cities_ref.WhereIn("region", std::vector<FieldValue> {
FieldValue::String("west_coast"),
FieldValue::String("east_coast")
});
snippets.cpp | |
firebase/queries4_387_0.txt | ##### C++
cities_ref.WhereEqualTo("state", FieldValue::String("CO"))
.WhereEqualTo("name", FieldValue::String("Denver"));
cities_ref.WhereEqualTo("state", FieldValue::String("CA"))
.WhereLessThan("population", FieldValue::Integer(1000000));
snippets.cpp | |
firebase/performance_monitoring_3_5.txt | s-web/blob/a9160f62f8ebff02285779974620ad3ff260f5ac/snippets/perf-next/index/perf_add_custom_attributes.js#L8-L23)
### Web namespaced API
const trace = perf.trace("test_trace");
trace.putAttribute("experiment", "A");
// Update scenario
trace.putAttribute("experiment", "B");
//... | |
firebase/queries4_95_0.txt | * Label images
* Overview
* iOS
* Android | |
firebase/multiple-range-fields5_35_0.txt | * Android
* Sign in with a pre-built UI
* Get Started
* Manage Users
* Password Authentication
* Email Link Authentication
* Google
* Facebook Login
* Sign in with Apple
* Twitter
* GitHub
* Microsoft
* Yahoo
* Play Games Si... | |
firebase/firestore_0_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/multiple-range-fields5_155_0.txt |
db.collection("employees")
.whereGreaterThan("salary", 100000)
.whereGreaterThan("experience", 0)
.orderBy("salary")
.orderBy("experience");
### Node.js | |
firebase/multiple-range-fields5_6_0.txt | * Samples
Community | |
firebase/queries4_212_0.txt |
db.collection("cities")
.whereEqualTo("capital", true)
.get()
.addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful... | |
firebase/multiple-range-fields5_138_0.txt | * Learn
* Events
* Stories
* Add Firebase - Apple platforms (iOS+)
* Add Firebase - Android
* Add Firebase - Web
* Add Firebase - Flutter
* Add Firebase - C++
* Add Firebase - Unity
* Add Firebase - Server environments
* Manage Firebase projects
* Supported platforms & frameworks
... | |
firebase/queries4_374_0.txt | ## Compound ( ` AND ` ) queries
You can combine constraints with a logical ` AND ` by chaining multiple
equality operators ( ` == ` or ` array-contains ` ). However, you must create
a composite index to combine equality operators with the inequality
operators, ` < ` , ` <= ` , ` > ` , and ` != ` . | |
firebase/multiple-range-fields5_10_0.txt | * Documentation
* Firestore
Overview Fundamentals | |
firebase/queries4_525_0.txt | | 1
query(collectionRef, or( where("a", "==", 1), where("b", "==", 2) ))
| 2
query(collectionRef,
or( and( where("a", "==", 1), where("c", "==", 3) ),
and( where("a", "==", 1), where("d", "==", 4) ),
and( where("b", "==", 2), ... | |
firebase/queries4_518_0.txt | ### Limits on ` OR ` queries
To prevent a query from becoming too computationally expensive, Cloud
Firestore limits how many ` AND ` and ` OR ` clauses you can combine. To apply
this limit, Cloud Firestore converts queries that perform logical ` OR `
operations ( ` or ` , ` in ` , and ` array-contains-any ` ) to dis... | |
firebase/firestore_3_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/firestore_4_3.txt | /docs/auth/cpp/password-auth)
* [ Google ](/docs/auth/cpp/google-signin)
* [ Play Games Sign-in ](/docs/auth/cpp/play-games)
* [ GitHub ](/docs/auth/cpp/github-auth)
* [ Facebook Login ](/docs/auth/cpp/facebook-login)
* [ Sign in with Apple ](/docs/auth/cpp/apple)
* [ Twitter Lo... | |
firebase/queries4_335_0.txt | ##### Swift
Note: This product is not available on watchOS and App Clip targets. | |
firebase/queries4_236_0.txt |
final citiesRef = db.collection("cities");
final stateQuery = citiesRef.where("state", isEqualTo: "CA");
final populationQuery = citiesRef.where("population", isLessThan: 100000);
final nameQuery = citiesRef.where("name", isEqualTo: "San Francisco");
firestore.dart
##### Java | |
firebase/queries4_204_0.txt | After creating a query object, use the ` get() ` function to retrieve the
results:
### Web modular API | |
firebase/firestore-data-filter-by-date-android-java9_49_0.txt | * The [connect] tag is being burninated
#### Linked | |
firebase/multiple-range-fields5_64_0.txt | * Understand Rules
* Get Started
* Structure Security Rules
* Write Conditions for Security Rules
* Index Data
* Manage Rules via REST
* Usage and Performance | |
firebase/multiple-range-fields5_84_0.txt | * Recognize landmarks
* iOS+
* Android | |
firebase/queries4_14_0.txt | * Add Firebase - Server environments
* Manage Firebase projects | |
firebase/performance_monitoring_3_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/multiple-range-fields5_116_0.txt | * Test functions
* Run functions locally
* Unit testing functions
* Test functions interactively | |
firebase/firestore-data-filter-by-date-android-java9_10_0.txt | 8. Discussions
9. Collectives | |
firebase/queries4_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/firestore-data-filter-by-date-android-java9_67_0.txt | * About
* Press
* Work Here
* Legal
* Privacy Policy
* Terms of Service
* Contact Us
* Cookie Settings
* Cookie Policy
##### Stack Exchange Network | |
firebase/performance_monitoring_1_7.txt | ttps://creativecommons.org/licenses/by/4.0/) , and code samples are
licensed under the [ Apache 2.0 License
](https://www.apache.org/licenses/LICENSE-2.0) . For details, see the [ Google
Developers Site Policies ](https://developers.google.com/site-policies) . Java
is a registered trademark of Oracle and/or its affilia... | |
firebase/firestore_3_1.txt | )
* [ 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 Links ](https:... | |
firebase/queries4_158_0.txt | ##### Node.js
const citiesRef = db.collection('cities');
await citiesRef.doc('SF').set({
name: 'San Francisco', state: 'CA', country: 'USA',
capital: false, population: 860000,
regions: ['west_coast', 'norcal']
});
await citiesRef.doc('LA').set({
name: 'Los Angel... | |
firebase/queries4_109_0.txt | * iOS
* Android
* Hosting | |
firebase/firestore-data-filter-by-date-android-java9_43_0.txt | Add a comment |
## | |
firebase/multiple-range-fields5_167_0.txt | ## Limitations
Apart from the query limitations , note the following limitations before
using queries with range and inequality filters on multiple fields: | |
firebase/firestore-query-filter-compound-multi-eq5_40_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.
[{ "type": "thumb... | |
firebase/multiple-range-fields5_93_0.txt | * Detect faces
* Overview
* Concepts
* iOS
* Android | |
firebase/queries4_392_0.txt | ##### C#
CollectionReference citiesRef = db.Collection("cities");
Query chainedQuery = citiesRef
.WhereEqualTo("State", "CA")
.WhereEqualTo("Name", "San Francisco");
Program.cs | |
firebase/firestore-data-filter-by-date-android-java9_39_0.txt | Perform simple and compound queries in Cloud Firestore
Please note that the query capabilities/number of times that you can use will
depend on the plan you are with on Firebase. The free plan (Spark) allows you
to retrieve only 3 results with compound queries. The paid plan (Blaze) has no
limit. | |
firebase/queries4_37_0.txt | * Web
* Sign in with a pre-built UI
* Get Started
* Manage Users
* Password Authentication
* Email Link Authentication
* Google
* Facebook Login
* Sign in with Apple
* Twitter
* GitHub
* Microsoft
* Yahoo
* Phone Number
... | |
firebase/queries4_493_0.txt |
cities_ref = firestore.col collection_path
sf_landmarks = cities_ref.document("SF").collection("landmarks")
sf_landmarks.document.set(
{
name: "Golden Gate Bridge",
type: "bridge"
}
)
sf_landmarks.document.set(
{
name: "Legion of Honor",
... | |
firebase/queries4_194_0.txt |
// Create a reference to the cities collection
CollectionReference cities = db.collection("cities");
// Create a query against the collection.
Query query = cities.whereEqualTo("capital", true);
// retrieve query results asynchronously using query.get()
ApiFuture<QuerySnapshot> queryS... | |
firebase/queries4_4_0.txt | * Build
* Release & Monitor | |
firebase/queries4_13_0.txt | * Add Firebase - C++
* Add Firebase - Unity | |
firebase/queries4_53_0.txt | * API reference
* Android
* Swift
* Objective-C
* Web
* Flutter
* Cloud Functions
* Node.js
* Java
* Python
* Go
* C#
* PHP
* Ruby
* C++
* Unity
* REST
* RPC | |
firebase/multiple-range-fields5_109_0.txt | * iOS
* Android
* Hosting | |
firebase/multiple-range-fields5_58_0.txt | * Get Started
* Structure Data
* Read and Write Data
* Work with Lists of Data
* Enable Offline Capabilities
* Flutter | |
firebase/queries4_69_0.txt | * Get Started
* Create a Reference
* Upload Files
* Download Files
* Use File Metadata
* Delete Files
* List Files
* Handle Errors
* Flutter | |
firebase/firestore_2_8.txt | id/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 Cloud cre... | |
firebase/multiple-range-fields5_133_0.txt | * Delete User Data
* Get Started | |
firebase/multiple-range-fields5_122_0.txt | * Test Security Rules
* Set up the emulator
* Build unit tests
* Generate test reports
* Quickly validate Security Rules | |
firebase/queries4_478_0.txt | Note: This product is not available on watchOS and App Clip targets.
let citiesRef = db.collection("cities")
var data = ["name": "Golden Gate Bridge", "type": "bridge"]
citiesRef.document("SF").collection("landmarks").addDocument(data: data)
data = ["name": "Legion of Honor", "type... | |
firebase/firestore-query-filter-compound-multi-eq5_6_0.txt | * Observability and monitoring
* Security | |
firebase/queries4_271_0.txt |
import { query, where } from "firebase/firestore";
const q = query(citiesRef, where("regions", "array-contains", "west_coast"));
array_contains_filter.js
### Web namespaced API | |
firebase/queries4_85_0.txt | * Cloud AutoML Vision Edge (deprecated)
* Overview
* Train image labeling models
* Label images with your models | |
firebase/queries4_180_0.txt | ##### PHP
$citiesRef = $db->collection('samples/php/cities');
$query = $citiesRef->where('state', '=', 'CA');
$snapshot = $query->documents();
foreach ($snapshot as $document) {
printf('Document %s returned by query state=CA' . PHP_EOL, $document->id());
}
query_filter_e... | |
firebase/queries4_136_0.txt | * Related products
* Cloud Messaging
* Remote Config |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.