Why Google Solutions Products Pricing Getting started Docs 支援服務
Docs 支援服務

@google-cloud/datastore 2.0.0 » Class: Key

Constructor

Key

new Key(options)

Build a Datastore Key object.

Parameter

options

object

Configuration object.

Values in options have the following properties:

Parameter

path

array

Key path.

namespace

Optional

string

Optional namespace.

Example

const Datastore = require('@google-cloud/datastore');
const datastore = new Datastore();
const key = datastore.key({
  namespace: 'ns',
  path: ['Company', 123]
});

Properties

namespace

string

path

array