Service for reading from and writing to existing Bigtable tables. v2
Package
@google-cloud/bigtable!
Constructors
(constructor)(opts)
constructor(opts?: ClientOptions);
Construct an instance of BigtableClient.
Parameter
Name | Description |
opts |
ClientOptions
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
auth
Property Value
Type | Description |
gax.GoogleAuth | |
bigtableStub
bigtableStub?: 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;
} | |
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
Property Value
Type | Description |
{
[name: string]: gax.PathTemplate;
} | |
port
static get port(): number;
The port for this API service.
Property Value
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value
servicePath
static get servicePath(): string;
The DNS address for this API service.
Property Value
warn
warn: (code: string, message: string, warnType?: string) => void;
Property Value
Type | Description |
(code: string, message: string, warnType?: string) => void | |
Methods
checkAndMutateRow(request, options)
checkAndMutateRow(request?: protos.google.bigtable.v2.ICheckAndMutateRowRequest, options?: CallOptions): Promise<[protos.google.bigtable.v2.ICheckAndMutateRowResponse, protos.google.bigtable.v2.ICheckAndMutateRowRequest | undefined, {} | undefined]>;
Parameters
Name | Description |
request |
protos.google.bigtable.v2.ICheckAndMutateRowRequest
|
options |
CallOptions
|
Returns
Type | Description |
Promise<[protos.google.bigtable.v2.ICheckAndMutateRowResponse, protos.google.bigtable.v2.ICheckAndMutateRowRequest | undefined, {} | undefined]> | |
checkAndMutateRow(request, options, callback)
checkAndMutateRow(request: protos.google.bigtable.v2.ICheckAndMutateRowRequest, options: CallOptions, callback: Callback<protos.google.bigtable.v2.ICheckAndMutateRowResponse, protos.google.bigtable.v2.ICheckAndMutateRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.bigtable.v2.ICheckAndMutateRowRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.bigtable.v2.ICheckAndMutateRowResponse, protos.google.bigtable.v2.ICheckAndMutateRowRequest | null | undefined, {} | null | undefined>
|
Returns
checkAndMutateRow(request, callback)
checkAndMutateRow(request: protos.google.bigtable.v2.ICheckAndMutateRowRequest, callback: Callback<protos.google.bigtable.v2.ICheckAndMutateRowResponse, protos.google.bigtable.v2.ICheckAndMutateRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.bigtable.v2.ICheckAndMutateRowRequest
|
callback |
Callback<protos.google.bigtable.v2.ICheckAndMutateRowResponse, protos.google.bigtable.v2.ICheckAndMutateRowRequest | null | undefined, {} | null | undefined>
|
Returns
close()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed.
|
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>
|
Returns
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 | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub.
|
matchInstanceFromTableName(tableName)
matchInstanceFromTableName(tableName: string): string | number;
Parse the instance from Table resource.
Parameter
Name | Description |
tableName |
string
A fully-qualified path representing Table resource.
|
Returns
Type | Description |
string | number | {string} A string representing the instance.
|
matchProjectFromTableName(tableName)
matchProjectFromTableName(tableName: string): string | number;
Parse the project from Table resource.
Parameter
Name | Description |
tableName |
string
A fully-qualified path representing Table resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchTableFromTableName(tableName)
matchTableFromTableName(tableName: string): string | number;
Parse the table from Table resource.
Parameter
Name | Description |
tableName |
string
A fully-qualified path representing Table resource.
|
Returns
Type | Description |
string | number | {string} A string representing the table.
|
mutateRow(request, options)
mutateRow(request?: protos.google.bigtable.v2.IMutateRowRequest, options?: CallOptions): Promise<[protos.google.bigtable.v2.IMutateRowResponse, protos.google.bigtable.v2.IMutateRowRequest | undefined, {} | undefined]>;
Parameters
Name | Description |
request |
protos.google.bigtable.v2.IMutateRowRequest
|
options |
CallOptions
|
Returns
Type | Description |
Promise<[protos.google.bigtable.v2.IMutateRowResponse, protos.google.bigtable.v2.IMutateRowRequest | undefined, {} | undefined]> | |
mutateRow(request, options, callback)
mutateRow(request: protos.google.bigtable.v2.IMutateRowRequest, options: CallOptions, callback: Callback<protos.google.bigtable.v2.IMutateRowResponse, protos.google.bigtable.v2.IMutateRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.bigtable.v2.IMutateRowRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.bigtable.v2.IMutateRowResponse, protos.google.bigtable.v2.IMutateRowRequest | null | undefined, {} | null | undefined>
|
Returns
mutateRow(request, callback)
mutateRow(request: protos.google.bigtable.v2.IMutateRowRequest, callback: Callback<protos.google.bigtable.v2.IMutateRowResponse, protos.google.bigtable.v2.IMutateRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.bigtable.v2.IMutateRowRequest
|
callback |
Callback<protos.google.bigtable.v2.IMutateRowResponse, protos.google.bigtable.v2.IMutateRowRequest | null | undefined, {} | null | undefined>
|
Returns
mutateRows(request, options)
mutateRows(request?: protos.google.bigtable.v2.IMutateRowsRequest, options?: CallOptions): gax.CancellableStream;
Mutates multiple rows in a batch. Each individual row is mutated atomically as in MutateRow, but the entire batch is not executed atomically.
Parameters
Name | Description |
request |
protos.google.bigtable.v2.IMutateRowsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
gax.CancellableStream | {Stream} An object stream which emits [MutateRowsResponse] on 'data' event. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) for more details and examples.
|
readModifyWriteRow(request, options)
readModifyWriteRow(request?: protos.google.bigtable.v2.IReadModifyWriteRowRequest, options?: CallOptions): Promise<[protos.google.bigtable.v2.IReadModifyWriteRowResponse, protos.google.bigtable.v2.IReadModifyWriteRowRequest | undefined, {} | undefined]>;
Parameters
Name | Description |
request |
protos.google.bigtable.v2.IReadModifyWriteRowRequest
|
options |
CallOptions
|
Returns
Type | Description |
Promise<[protos.google.bigtable.v2.IReadModifyWriteRowResponse, protos.google.bigtable.v2.IReadModifyWriteRowRequest | undefined, {} | undefined]> | |
readModifyWriteRow(request, options, callback)
readModifyWriteRow(request: protos.google.bigtable.v2.IReadModifyWriteRowRequest, options: CallOptions, callback: Callback<protos.google.bigtable.v2.IReadModifyWriteRowResponse, protos.google.bigtable.v2.IReadModifyWriteRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.bigtable.v2.IReadModifyWriteRowRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.bigtable.v2.IReadModifyWriteRowResponse, protos.google.bigtable.v2.IReadModifyWriteRowRequest | null | undefined, {} | null | undefined>
|
Returns
readModifyWriteRow(request, callback)
readModifyWriteRow(request: protos.google.bigtable.v2.IReadModifyWriteRowRequest, callback: Callback<protos.google.bigtable.v2.IReadModifyWriteRowResponse, protos.google.bigtable.v2.IReadModifyWriteRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.bigtable.v2.IReadModifyWriteRowRequest
|
callback |
Callback<protos.google.bigtable.v2.IReadModifyWriteRowResponse, protos.google.bigtable.v2.IReadModifyWriteRowRequest | null | undefined, {} | null | undefined>
|
Returns
readRows(request, options)
readRows(request?: protos.google.bigtable.v2.IReadRowsRequest, options?: CallOptions): gax.CancellableStream;
Streams back the contents of all requested rows in key order, optionally applying the same Reader filter to each. Depending on their size, rows and cells may be broken up across multiple responses, but atomicity of each row will still be preserved. See the ReadRowsResponse documentation for details.
Parameters
Name | Description |
request |
protos.google.bigtable.v2.IReadRowsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
gax.CancellableStream | {Stream} An object stream which emits [ReadRowsResponse] on 'data' event. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) for more details and examples.
|
sampleRowKeys(request, options)
sampleRowKeys(request?: protos.google.bigtable.v2.ISampleRowKeysRequest, options?: CallOptions): gax.CancellableStream;
Returns a sample of row keys in the table. The returned row keys will delimit contiguous sections of the table of approximately equal size, which can be used to break up the data for distributed tasks like mapreduces.
Parameters
Name | Description |
request |
protos.google.bigtable.v2.ISampleRowKeysRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
gax.CancellableStream | {Stream} An object stream which emits [SampleRowKeysResponse] on 'data' event. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) for more details and examples.
|
tablePath(project, instance, table)
tablePath(project: string, instance: string, table: string): string;
Return a fully-qualified table resource name string.
Parameters
Name | Description |
project |
string
|
instance |
string
|
table |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|