GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-docs-samples/firestore at master · hitraw/java-docs-samples

Expand file tree

/

firestore

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

firestore

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

README.md

Outline

Getting started with Google Cloud Firestore

Open in Cloud Shell

Google Cloud Firestore is a hosted NoSQL database built for automatic scaling, high performance, and ease of application development.

These code samples demonstrate how to access the Google Cloud Firestore API using the Beta version of the Firestore Client Libraries.

Note: You cannot use both Cloud Firestore and Cloud Datastore in the same project, which might affect apps using App Engine. Try using Cloud Firestore with a different project.

Setup

  • Install Maven.
  • Open the Firebase Console and click Add project.
  • Select the option to Enable Cloud Firestore Beta for this project.
  • Click Create Project. When you create a Cloud Firestore project, it also enables the API in the Cloud API Manager.
  • Create a service account and set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to the credentials JSON file.

Build

Build your project:

 mvn clean package

Quickstart

Quickstart.java demonstrates adding and querying documents in a collection in Firestore. You can run the quickstart with:

mvn exec:java -Dexec.mainClass=com.example.firestore.Quickstart -Dexec.args="your-firestore-project-id"

Note: the default project-id will be used if no argument is provided.

Snippets

These code samples support the Firestore documentation.

Tests

Run all tests:

   mvn clean verify
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.