Class Key

Build a Datastore Key object.

Package

@google-cloud/datastore!

Constructors

(constructor)(options)

constructor(options: KeyOptions);

Constructs a new instance of the Key class

Parameter
TypeNameDescription
entity.KeyOptionsoptions

Properties

id

id?: string;
Property Value
TypeDescription
string

kind

kind: string;
Property Value
TypeDescription
string

name

name?: string;
Property Value
TypeDescription
string

namespace

namespace?: string;
Property Value
TypeDescription
string

parent

parent?: Key;
Property Value
TypeDescription
entity.Key

path

path: Array<string | number>;
Property Value
TypeDescription
Array<string | number>

serialized

get serialized(): {
            namespace: string | undefined;
            path: (string | Int)[];
        };

Access the serialized property for a library-compatible way to re-use a key.

Property Value
TypeDescription
{ namespace: string | undefined; path: (string | entity.Int)[]; }