Stay organized with collections Save and categorize content based on your preferences.
Each RPC normalizes the partition IDs of the keys in its input entities, and always returns entities with keys with normalized partition IDs. This applies to all keys and entities, including those in values, except keys with both an empty path and an empty or unset partition ID. Normalization of input keys sets the project ID (if not already set) to the project ID from the request.
v1
Package@google-cloud/datastore Constructors (constructor)(opts)constructor(opts?: ClientOptions);
Construct an instance of DatastoreClient.
Parameter Name Descriptionopts
ClientOptions
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value Type Descriptionstring
auth Property Value Type Description gax.GoogleAuth
datastoreStub
datastoreStub?: Promise<{
[name: string]: Function;
}>;
Property Value Type Description Promise<{ [name: string]: Function; }>
descriptors
descriptors: Descriptors;
Property Value Type Description Descriptors
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
Property Value Type Description { [name: string]: Function; }
port
static get port(): number;
The port for this API service.
Property Value Type Descriptionnumber
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value Type Descriptionstring[]
servicePath
static get servicePath(): string;
The DNS address for this API service.
Property Value Type Descriptionstring
warn
warn: (code: string, message: string, warnType?: string) => void;
Property Value Type Description (code: string, message: string, warnType?: string) => void
Methods allocateIds(request, options)
allocateIds(request?: protos.google.datastore.v1.IAllocateIdsRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | undefined, {} | undefined]>;
Parameters Name Description request
protos.google.datastore.v1.IAllocateIdsRequest
options
CallOptions
Promise<[protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | undefined, {} | undefined]>
allocateIds(request, options, callback)
allocateIds(request: protos.google.datastore.v1.IAllocateIdsRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.IAllocateIdsRequest
options
CallOptions
callback
Callback<protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | null | undefined, {} | null | undefined>
void
allocateIds(request, callback)
allocateIds(request: protos.google.datastore.v1.IAllocateIdsRequest, callback: Callback<protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.IAllocateIdsRequest
callback
Callback<protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | null | undefined, {} | null | undefined>
void
beginTransaction(request, options)
beginTransaction(request?: protos.google.datastore.v1.IBeginTransactionRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | undefined, {} | undefined]>;
Parameters Name Description request
protos.google.datastore.v1.IBeginTransactionRequest
options
CallOptions
Promise<[protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | undefined, {} | undefined]>
beginTransaction(request, options, callback)
beginTransaction(request: protos.google.datastore.v1.IBeginTransactionRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.IBeginTransactionRequest
options
CallOptions
callback
Callback<protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>
void
beginTransaction(request, callback)
beginTransaction(request: protos.google.datastore.v1.IBeginTransactionRequest, callback: Callback<protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.IBeginTransactionRequest
callback
Callback<protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>
void
close()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns Type DescriptionPromise<void>
{Promise} A promise that resolves when the client is closed.
commit(request, options)commit(request?: protos.google.datastore.v1.ICommitRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | undefined, {} | undefined]>;
Parameters Name Description request
protos.google.datastore.v1.ICommitRequest
options
CallOptions
Promise<[protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | undefined, {} | undefined]>
commit(request, options, callback)
commit(request: protos.google.datastore.v1.ICommitRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.ICommitRequest
options
CallOptions
callback
Callback<protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | null | undefined, {} | null | undefined>
void
commit(request, callback)
commit(request: protos.google.datastore.v1.ICommitRequest, callback: Callback<protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.ICommitRequest
callback
Callback<protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | null | undefined, {} | null | undefined>
void
getProjectId()
getProjectId(): Promise<string>;
Returns Type Description Promise<string>
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter Name Description callback
Callback<string, undefined, undefined>
void
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns Type DescriptionPromise<{ [name: string]: Function; }>
{Promise} A promise that resolves to an authenticated service stub.
lookup(request, options)lookup(request?: protos.google.datastore.v1.ILookupRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | undefined, {} | undefined]>;
Parameters Name Description request
protos.google.datastore.v1.ILookupRequest
options
CallOptions
Promise<[protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | undefined, {} | undefined]>
lookup(request, options, callback)
lookup(request: protos.google.datastore.v1.ILookupRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.ILookupRequest
options
CallOptions
callback
Callback<protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | null | undefined, {} | null | undefined>
void
lookup(request, callback)
lookup(request: protos.google.datastore.v1.ILookupRequest, callback: Callback<protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.ILookupRequest
callback
Callback<protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | null | undefined, {} | null | undefined>
void
reserveIds(request, options)
reserveIds(request?: protos.google.datastore.v1.IReserveIdsRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | undefined, {} | undefined]>;
Parameters Name Description request
protos.google.datastore.v1.IReserveIdsRequest
options
CallOptions
Promise<[protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | undefined, {} | undefined]>
reserveIds(request, options, callback)
reserveIds(request: protos.google.datastore.v1.IReserveIdsRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.IReserveIdsRequest
options
CallOptions
callback
Callback<protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | null | undefined, {} | null | undefined>
void
reserveIds(request, callback)
reserveIds(request: protos.google.datastore.v1.IReserveIdsRequest, callback: Callback<protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.IReserveIdsRequest
callback
Callback<protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | null | undefined, {} | null | undefined>
void
rollback(request, options)
rollback(request?: protos.google.datastore.v1.IRollbackRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | undefined, {} | undefined]>;
Parameters Name Description request
protos.google.datastore.v1.IRollbackRequest
options
CallOptions
Promise<[protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | undefined, {} | undefined]>
rollback(request, options, callback)
rollback(request: protos.google.datastore.v1.IRollbackRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.IRollbackRequest
options
CallOptions
callback
Callback<protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | null | undefined, {} | null | undefined>
void
rollback(request, callback)
rollback(request: protos.google.datastore.v1.IRollbackRequest, callback: Callback<protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.IRollbackRequest
callback
Callback<protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | null | undefined, {} | null | undefined>
void
runQuery(request, options)
runQuery(request?: protos.google.datastore.v1.IRunQueryRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | undefined, {} | undefined]>;
Parameters Name Description request
protos.google.datastore.v1.IRunQueryRequest
options
CallOptions
Promise<[protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | undefined, {} | undefined]>
runQuery(request, options, callback)
runQuery(request: protos.google.datastore.v1.IRunQueryRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.IRunQueryRequest
options
CallOptions
callback
Callback<protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | null | undefined, {} | null | undefined>
void
runQuery(request, callback)
runQuery(request: protos.google.datastore.v1.IRunQueryRequest, callback: Callback<protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | null | undefined, {} | null | undefined>): void;
Parameters Name Description request
protos.google.datastore.v1.IRunQueryRequest
callback
Callback<protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | null | undefined, {} | null | undefined>
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["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-08-07 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4