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
Type Name Description
KeyOptions
options

Properties

id

  id 
 ?: 
  
 string 
 ; 
 
Property Value
Type Description
string

kind

  kind 
 : 
  
 string 
 ; 
 
Property Value
Type Description
string

name

  name 
 ?: 
  
 string 
 ; 
 
Property Value
Type Description
string

namespace

  namespace 
 ?: 
  
 string 
 ; 
 
Property Value
Type Description
string

parent

  parent 
 ?: 
  
 Key 
 ; 
 
Property Value
Type Description
entity.Key

path

  path 
 : 
  
 Array<string 
  
 | 
  
 number 
> ; 
 
Property Value
Type Description
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
Type Description
{ namespace: string | undefined; path: (string | entity.Int )[]; }
Create a Mobile Website
View Site in Mobile | Classic
Share by: