Class Index (6.6.2)

Package

@google-cloud/datastore

Example

 const {Datastore} = require(' @google-cloud/datastore 
');
const datastore = new Datastore 
();
const index = datastore. index 
('my-index'); 

Constructors

(constructor)(datastore, id)

  constructor 
 ( 
 datastore 
 : 
  
 Datastore 
 , 
  
 id 
 : 
  
 string 
 ); 
 

Constructs a new instance of the Index class

Parameters
Name
Description
datastore
Datastore
id
string

Properties

datastore

  datastore 
 : 
  
 Datastore 
 ; 
 
Property Value
Type
Description
Datastore

id

  id 
 : 
  
 string 
 ; 
 
Property Value
Type
Description
string
  metadata 
 ?: 
  
 IIndex 
 ; 
 
Property Value
Type
Description
IIndex

Methods

get(gaxOptions)

  get 
 ( 
 gaxOptions 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise<GetIndexResponse> 
 ; 
 

Get an index if it exists.

Parameter
Name
Description
gaxOptions
CallOptions

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html .

Returns
Type
Description
Promise < GetIndexResponse >

get(callback)

  get 
 ( 
 callback 
 : 
  
 GetIndexCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name
Description
callback
GetIndexCallback
Returns
Type
Description
void

get(gaxOptions, callback)

  get 
 ( 
 gaxOptions 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 GetIndexCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
gaxOptions
CallOptions
callback
GetIndexCallback
Returns
Type
Description
void
  getMetadata 
 ( 
 gaxOptions 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise<IndexGetMetadataResponse> 
 ; 
 

Get the metadata of this index.

Parameter
Name
Description
gaxOptions
CallOptions

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html .

Returns
Type
Description
Promise < IndexGetMetadataResponse >
  getMetadata 
 ( 
 callback 
 : 
  
 IndexGetMetadataCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name
Description
callback
IndexGetMetadataCallback
Returns
Type
Description
void
  getMetadata 
 ( 
 gaxOptions 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 IndexGetMetadataCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
gaxOptions
CallOptions
callback
IndexGetMetadataCallback
Returns
Type
Description
void
Create a Mobile Website
View Site in Mobile | Classic
Share by: