Skip to main content

Built and signed on GitHub Actions

A set of APIs that allow interfacing to Google Datastore on GCP.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
6 months ago (0.3.1)

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

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.

Examples

Example 1

import { Datastore } from "jsr:@kitsonk/google-datastore";
import keys from "./service-account.json" with { type: "json" };

const datastore = new Datastore(keys);
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@kitsonk/google-datastore

Import symbol

import * as google_datastore from "@kitsonk/google-datastore";

---- OR ----

Import directly with a jsr specifier

import * as google_datastore from "jsr:@kitsonk/google-datastore";

Add Package

npx jsr add @kitsonk/google-datastore

Import symbol

import * as google_datastore from "@kitsonk/google-datastore";

Add Package

yarn dlx jsr add @kitsonk/google-datastore

Import symbol

import * as google_datastore from "@kitsonk/google-datastore";

Add Package

pnpm dlx jsr add @kitsonk/google-datastore

Import symbol

import * as google_datastore from "@kitsonk/google-datastore";

Add Package

bunx jsr add @kitsonk/google-datastore

Import symbol

import * as google_datastore from "@kitsonk/google-datastore";