Send feedback Class Index (9.1.0) Stay organized with collections Save and categorize content based on your preferences. Version latestkeyboard_arrow_down 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 theIndex class
Parameters Name Description datastoreDatastore idstring
Properties datastore id metadata Methods get(gaxOptions)
get ( gaxOptions ?: CallOptions ) : Promise<GetIndexResponse> ; Get an index if it exists.
Returns Type Description Promise <GetIndexResponse >
get(callback)
get ( callback : GetIndexCallback ) : void ; Parameter Name Description callbackGetIndexCallback
Returns Type Description void
get(gaxOptions, callback)
get ( gaxOptions : CallOptions , callback : GetIndexCallback ) : void ; Parameters Name Description gaxOptionsCallOptions callbackGetIndexCallback
Returns Type Description void
getMetadata(gaxOptions)
getMetadata ( gaxOptions ?: CallOptions ) : Promise<IndexGetMetadataResponse> ; Get the metadata of this index.
Returns Type Description Promise <IndexGetMetadataResponse >
getMetadata(callback)
getMetadata ( callback : IndexGetMetadataCallback ) : void ; Parameter Name Description callbackIndexGetMetadataCallback
Returns Type Description void
getMetadata(gaxOptions, callback)
getMetadata ( gaxOptions : CallOptions , callback : IndexGetMetadataCallback ) : void ; Parameters Name Description gaxOptionsCallOptions callbackIndexGetMetadataCallback
Returns Type Description void
Send feedback
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License , and code samples are licensed under theApache 2.0 License . For details, see theGoogle Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.
Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]