8000 java-docs-samples/firestore at pull-threads · ileinone/java-docs-samples · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"allShortcutsEnabled":false,"path":"firestore","repo":{"id":260132701,"defaultBranch":"master","name":"java-docs-samples","ownerLogin":"ileinone","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2020-04-30T06:36:25.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/1706815?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"pull-threads","listCacheKey":"v0:1615175252.025974","canEdit":false,"refType":"branch","currentOid":"66be32aec94d654a19c268f02e4d078b10fd4f75"},"tree":{"items":[{"name":"src","path":"firestore/src","contentType":"directory"},{"name":"README.md","path":"firestore/README.md","contentType":"file"},{"name":"pom.xml","path":"firestore/pom.xml","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGetting started with Google Cloud Firestore\u003c/h1\u003e\u003ca id=\"user-content-getting-started-with-google-cloud-firestore\" class=\"anchor\" aria-label=\"Permalink: Getting started with Google Cloud Firestore\" href=\"#getting-started-with-google-cloud-firestore\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003ca href=\"https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/java-docs-samples\u0026amp;page=editor\u0026amp;open_in_editor=firestore/README.md\" rel=\"nofollow\"\u003e\n\u003cimg alt=\"Open in Cloud Shell\" src=\"https://camo.githubusercontent.com/cf29981159f3fb8f7d5c5ce0a4a4ab3d2a8e500b782d2016717c3e4aa6124bc5/687474703a2f2f677374617469632e636f6d2f636c6f75647373682f696d616765732f6f70656e2d62746e2e706e67\" data-canonical-src=\"http://gstatic.com/cloudssh/images/open-btn.png\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://cloud.google.com/firestore/docs/\" rel=\"nofollow\"\u003eGoogle Cloud Firestore\u003c/a\u003e is a hosted NoSQL database built\nfor automatic scaling, high performance, and ease of application development.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThese code samples demonstrate how to access the Google Cloud Firestore API\nusing the Beta version of the Firestore Client Libraries.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eNote: You cannot use both Cloud Firestore and Cloud Datastore in the\nsame project, which might affect apps using App Engine. Try using Cloud Firestore with a different\nproject.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSetup\u003c/h2\u003e\u003ca id=\"user-content-setup\" class=\"anchor\" aria-label=\"Permalink: Setup\" href=\"#setup\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eInstall \u003ca href=\"http://maven.apache.org/\" rel=\"nofollow\"\u003eMaven\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eOpen the \u003ca href=\"https://console.firebase.com\" rel=\"nofollow\"\u003eFirebase Console\u003c/a\u003e and click \u003cstrong\u003eAdd project\u003c/strong\u003e.\u003c/li\u003e\n\u003cli\u003eSelect the option to \u003cstrong\u003eEnable Cloud Firestore Beta\u003c/strong\u003e for this project.\u003c/li\u003e\n\u003cli\u003eClick \u003cstrong\u003eCreate Project\u003c/strong\u003e.\nWhen you create a Cloud Firestore project, it also enables the API in the\n\u003ca href=\"https://console.cloud.google.com/projectselector/apis/api/firestore.googleapis.com/overview\" rel=\"nofollow\"\u003eCloud API Manager\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://cloud.google.com/docs/authentication/\" rel=\"nofollow\"\u003eCreate a service account\u003c/a\u003e\nand set the \u003ccode\u003eGOOGLE_APPLICATION_CREDENTIALS\u003c/code\u003e environment variable to point to the\ncredentials JSON file.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eBuild\u003c/h2\u003e\u003ca id=\"user-content-build\" class=\"anchor\" aria-label=\"Permalink: Build\" href=\"#build\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBuild your project:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\" mvn clean package\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e mvn clean package\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eQuickstart\u003c/h2\u003e\u003ca id=\"user-content-quickstart\" class=\"anchor\" aria-label=\"Permalink: Quickstart\" href=\"#quickstart\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"/ileinone/java-docs-samples/blob/pull-threads/firestore/src/main/java/com/example/java/com/example/firestore/Quicstart.java\"\u003eQuickstart.java\u003c/a\u003e\ndemonstrates adding and querying documents in a collection in Firestore.\nYou can run the quickstart with:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"mvn exec:exec -Dfirestore.project.id=\u0026quot;your-firestore-project-id\u0026quot;\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003emvn exec:exec -Dfirestore.project.id=\"your-firestore-project-id\"\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eNote: the default project-id will be used if no argument is provided.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSnippets\u003c/h2\u003e\u003ca id=\"user-content-snippets\" class=\"anchor\" aria-label=\"Permalink: Snippets\" href=\"#snippets\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThese \u003ca href=\"/ileinone/java-docs-samples/blob/pull-threads/firestore/src/main/java/com/example/firestore/snippets\"\u003ecode samples\u003c/a\u003e support\nthe Firestore \u003ca href=\"https://cloud.google.com/firestore/docs\" rel=\"nofollow\"\u003edocumentation\u003c/a\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTests\u003c/h2\u003e\u003ca id=\"user-content-tests\" class=\"anchor\" aria-label=\"Permalink: Tests\" href=\"#tests\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eRun all tests:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\" mvn clean verify\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e mvn clean verify\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003c/article\u003e","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Getting started with Google Cloud Firestore","anchor":"getting-started-with-google-cloud-firestore","htmlText":"Getting started with Google Cloud Firestore"},{"level":2,"text":"Setup","anchor":"setup","htmlText":"Setup"},{"level":2,"text":"Build","anchor":"build","htmlText":"Build"},{"level":2,"text":"Quickstart","anchor":"quickstart","htmlText":"Quickstart"},{"level":2,"text":"Snippets","anchor":"snippets","htmlText":"Snippets"},{"level":2,"text":"Tests","anchor":"tests","htmlText":"Tests"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fileinone%2Fjava-docs-samples%2Ftree%2Fpull-threads%2Ffirestore"}},"totalCount":3,"showBranchInfobar":true},"fileTree":{"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":".kokoro","path":".kokoro","contentType":"directory"},{"name":"appengine-java11","path":"appengine-java11","contentType":"directory"},{"name":"appengine-java8","path":"appengine-java8","contentType":"directory"},{"name":"asset","path":"asset","contentType":"directory"},{"name":"auth","path":"auth","contentType":"directory"},{"name":"automl","path":"automl","contentType":"directory"},{"name":"bigquery","path":"bigquery","contentType":"directory"},{"name":"bigtable","path":"bigtable","contentType":"directory"},{"name":"cdn","path":"cdn","contentType":"directory"},{"name":"cloud-sql","path":"cloud-sql","contentType":"directory"},{"name":"compute","path":"compute","contentType":"directory"},{"name":"container-registry","path":"container-registry","contentType":"directory"},{"name":"datacatalog","path":"datacatalog","contentType":"directory"},{"name":"dataflow","path":"dataflow","contentType":"directory"},{"name":"datalabeling","path":"datalabeling","contentType":"directory"},{"name":"dataproc","path":"dataproc","contentType":"directory"},{"name":"datastore","path":"datastore","contentType":"directory"},{"name":"dialogflow","path":"dialogflow","contentType":"directory"},{"name":"dlp","path":"dlp","contentType":"directory"},{"name":"endpoints","path":"endpoints","contentType":"directory"},{"name":"errorreporting","path":"errorreporting","contentType":"directory"},{"name":"firestore","path":"firestore","contentType":"directory"},{"name":"flexible","path":"flexible","contentType":"directory"},{"name":"functions","path":"functions","contentType":"directory"},{"name":"healthcare","path":"healthcare","contentType":"directory"},{"name":"iam","path":"iam","contentType":"directory"},{"name":"iap","path":"iap","contentType":"directory"},{"name":"iot","path":"iot","contentType":"directory"},{"name":"jobs","path":"jobs","contentType":"directory"},{"name":"kms","path":"kms","contentType":"directory"},{"name":"language","path":"language","contentType":"directory"},{"name":"logging","path":"logging","contentType":"directory"},{"name":"memorystore","path":"memorystore","contentType":"directory"},{"name":"mlengine","path":"mlengine","contentType":"directory"},{"name":"monitoring","path":"monitoring","contentType":"directory"},{"name":"opencensus","path":"opencensus","contentType":"directory"},{"name":"pubsub","path":"pubsub","contentType":"directory"},{"name":"recommender","path":"recommender","contentType":"directory"},{"name":"run","path":"run","contentType":"directory"},{"name":"secretmanager","path":"secretmanager","contentType":"directory"},{"name":"securitycenter","path":"securitycenter","contentType":"directory"},{"name":"session-handling","path":"session-handling","contentType":"directory"},{"name":"spanner","path":"spanner","contentType":"directory"},{"name":"speech","path":"speech","contentType":"directory"},{"name":"storage","path":"storage","contentType":"directory"},{"name":"tasks","path":"tasks","contentType":"directory"},{"name":"texttospeech","path":"texttospeech","contentType":"directory"},{"name":"trace","path":"trace","contentType":"directory"},{"name":"translate","path":"translate","contentType":"directory"},{"name":"unittests","path":"unittests","contentType":"directory"},{"name":"video","path":"video","contentType":"directory"},{"name":"vision","path":"vision","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"SAMPLE_FORMAT.md","path":"SAMPLE_FORMAT.md","contentType":"file"},{"name":"build.gradle","path":"build.gradle","contentType":"file"},{"name":"codecov.yml","path":"codecov.yml","contentType":"file"},{"name":"renovate.json","path":"renovate.json","contentType":"file"}],"totalCount":61}},"fileTreeProcessingTime":8.513206,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/ileinone/java-docs-samples/branches":{"post":"74YunJLuR1bTqusBBu5lD0Sx4pA2_wqsKkueuCW0a_6tR11JDTDfd-mpZ1szl_6enGNHwHL6rO2EVOIctORSPQ"},"/ileinone/java-docs-samples/branches/fetch_and_merge/pull-threads":{"post":"hCRAOUHSNfyU9YXaCWj4EvzMYLnF406Saf6U_7AqmYe0KFa0Q_ddR_7xfRXmFm1mX3qNNoPVxp4r9cRRlQegBQ"},"/ileinone/java-docs-samples/branches/fetch_and_merge/pull-threads?discard_changes=true":{"post":"ttjpqVExDIyGBK1xWsoud7zlrSC9Hytq8Ym8psQpG8eG1P8kUxRkN-wAVb61tLsDH1NAr_spo2azguwI4QQiRQ"}}},"title":"java-docs-samples/firestore at pull-threads · ileinone/java-docs-samples","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-7d7eb7c71814.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1ae9fa256942.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true,"github_models_repo_integration":false}}}
0