Class Index (8.7.0)

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
id
string

Properties

datastore

  datastore 
 : 
  
 Datastore 
 ; 
 

id

  id 
 : 
  
 string 
 ; 
 
  metadata 
 ?: 
  
 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
Design a Mobile Site
View Site in Mobile | Classic
Share by: