Skip to main content
Module

x/google_datastore/mod.ts

A set of APIs that allow interfacing to Google Datastore on GCP from Deno.
Go to Latest
import * as googleDatastore from "https://deno.land/x/google_datastore@0.0.14/mod.ts";

APIs for using Google Datastore from Deno.

Google Datastore is Firestore in Datastore under the hood these days, but has a more concise API and lacks the complex rule system that Firestore running in its native mode provides.

Users should create an instance of Datastore to connect to an instance of Google Datastore. Converting a datastore Entity to a JavaScript object can be done with entityToObject and a JavaScript object can be converted to an Entity via objectToEntity.

You can associate a datastore Key with a JavaScript object via the objectSetKey function. Any entities that were converted to objects with entityToObject will already have their key set, so can be mutated and then converted back to an entity and not lose their key.

Classes

An interface to Google Datastore. This is the main class users should use to connect to a Google Datastore instance.

Errors using Datastore will by of this type, which includes extra info about the error.

Provides the APIs for indexes for Datastore instances. Exported for documentation purposes and should not be instantiated by users.

Provides the operations APIs on the Datastore instances. Exported for documentation purposes and should not be instantiated by users.

Variables

A symbol which can be used to provide a custom method to generate an Entity serialization for an object. When performing objectToEntity, this method will be used instead of built in serialization of objects to entities.

Functions

Convert a Datastore Value to a JavaScript value.

Convert a Datastore Entity to a JavaScript object, which can then be serialized easily back into an Entity.

Get the datastore Key for an object, or return undefined.

Assign a datastore Key to a JavaScript object. This key will then be set in any resulting Entity.

A function which converts most JavaScript objects to entities that can be stored in Google Datastore. If the object as a toEntity symbol method, it will be used to serialize the entity.

Interfaces

Options that can be used when committing mutations to the datastore.

The information from a service account JSON file that is used by the Datastore to be able to securely connect.