Class Table (3.5.4)

Create a Table object to interact with a Cloud Bigtable table.

Package

@google-cloud/bigtable!

Constructors

(constructor)(instance, id)

constructor(instance: Instance, id: string);

Constructs a new instance of the Table class

Parameters
NameDescription
instance Instance
id string

Properties

bigtable

bigtable: Bigtable;
Property Value
TypeDescription
Bigtable

id

id: string;
Property Value
TypeDescription
string

instance

instance: Instance;
Property Value
TypeDescription
Instance

maxRetries

maxRetries?: number;
Property Value
TypeDescription
number

metadata

metadata?: google.bigtable.admin.v2.ITable;
Property Value
TypeDescription
google.bigtable.admin.v2.ITable

name

name: string;
Property Value
TypeDescription
string

VIEWS

static VIEWS: {
        [index: string]: number;
    };

The view to be applied to the returned table's fields. Defaults to schema if unspecified.

Property Value
TypeDescription
{ [index: string]: number; }

Methods

checkConsistency(token)

checkConsistency(token: string): Promise<CheckConsistencyResponse>;
Parameter
NameDescription
token string
Returns
TypeDescription
Promise<CheckConsistencyResponse>

checkConsistency(token, callback)

checkConsistency(token: string, callback: CheckConsistencyCallback): void;
Parameters
NameDescription
token string
callback CheckConsistencyCallback
Returns
TypeDescription
void

create(options)

create(options?: CreateTableOptions): Promise<CreateTableResponse>;
Parameter
NameDescription
options CreateTableOptions
Returns
TypeDescription
Promise<CreateTableResponse>

create(options, callback)

create(options: CreateTableOptions, callback: CreateTableCallback): void;
Parameters
NameDescription
options CreateTableOptions
callback CreateTableCallback
Returns
TypeDescription
void

create(callback)

create(callback: CreateTableCallback): void;
Parameter
NameDescription
callback CreateTableCallback
Returns
TypeDescription
void

createBackup(id, config)

createBackup(id: string, config: CreateBackupConfig): Promise<CreateBackupResponse>;
Parameters
NameDescription
id string
config CreateBackupConfig
Returns
TypeDescription
Promise<CreateBackupResponse>

createBackup(id, config, callback)

createBackup(id: string, config: CreateBackupConfig, callback: CreateBackupCallback): void;
Parameters
NameDescription
id string
config CreateBackupConfig
callback CreateBackupCallback
Returns
TypeDescription
void

createBackup(id, config, callback)

createBackup(id: string, config: CreateBackupConfig, callback: CreateBackupCallback): void;
Parameters
NameDescription
id string
config CreateBackupConfig
callback CreateBackupCallback
Returns
TypeDescription
void

createFamily(id, options)

createFamily(id: string, options?: CreateFamilyOptions): Promise<CreateFamilyResponse>;
Parameters
NameDescription
id string
options CreateFamilyOptions
Returns
TypeDescription
Promise<CreateFamilyResponse>

createFamily(id, options, callback)

createFamily(id: string, options: CreateFamilyOptions, callback: CreateFamilyCallback): void;
Parameters
NameDescription
id string
options CreateFamilyOptions
callback CreateFamilyCallback
Returns
TypeDescription
void

createFamily(id, callback)

createFamily(id: string, callback: CreateFamilyCallback): void;
Parameters
NameDescription
id string
callback CreateFamilyCallback
Returns
TypeDescription
void

createPrefixRange(start)

static createPrefixRange(start: string): PrefixRange;

Creates a range based off of a key prefix.

Parameter
NameDescription
start string

The key prefix/starting bound.

Returns
TypeDescription
PrefixRange

{object} range

createReadStream(opts)

createReadStream(opts?: GetRowsOptions): PassThrough;

Get Row objects for the rows currently in your table as a readable object stream.

Parameter
NameDescription
opts GetRowsOptions
Returns
TypeDescription
PassThrough

{stream}

decodePolicyEtag(policy)

static decodePolicyEtag(policy: Policy): Policy;

Formats the decodes policy etag value to string.

Parameter
NameDescription
policy Policy
Returns
TypeDescription
Policy

delete(gaxOptions)

delete(gaxOptions?: CallOptions): Promise<DeleteTableResponse>;
Parameter
NameDescription
gaxOptions CallOptions
Returns
TypeDescription
Promise<DeleteTableResponse>

delete(gaxOptions, callback)

delete(gaxOptions: CallOptions, callback: DeleteTableCallback): void;
Parameters
NameDescription
gaxOptions CallOptions
callback DeleteTableCallback
Returns
TypeDescription
void

delete(callback)

delete(callback: DeleteTableCallback): void;
Parameter
NameDescription
callback DeleteTableCallback
Returns
TypeDescription
void

deleteRows(prefix, gaxOptions)

deleteRows(prefix: string, gaxOptions?: CallOptions): Promise<DeleteRowsResponse>;
Parameters
NameDescription
prefix string
gaxOptions CallOptions
Returns
TypeDescription
Promise<DeleteRowsResponse>

deleteRows(prefix, gaxOptions, callback)

deleteRows(prefix: string, gaxOptions: CallOptions, callback: DeleteRowsCallback): void;
Parameters
NameDescription
prefix string
gaxOptions CallOptions
callback DeleteRowsCallback
Returns
TypeDescription
void

deleteRows(prefix, callback)

deleteRows(prefix: string, callback: DeleteRowsCallback): void;
Parameters
NameDescription
prefix string
callback DeleteRowsCallback
Returns
TypeDescription
void

exists(gaxOptions)

exists(gaxOptions?: CallOptions): Promise<TableExistsResponse>;
Parameter
NameDescription
gaxOptions CallOptions
Returns
TypeDescription
Promise<TableExistsResponse>

exists(gaxOptions, callback)

exists(gaxOptions: CallOptions, callback: TableExistsCallback): void;
Parameters
NameDescription
gaxOptions CallOptions
callback TableExistsCallback
Returns
TypeDescription
void

exists(callback)

exists(callback: TableExistsCallback): void;
Parameter
NameDescription
callback TableExistsCallback
Returns
TypeDescription
void

family(id)

family(id: string): Family;

Get a reference to a Table Family.

Parameter
NameDescription
id string

The family unique identifier.

Returns
TypeDescription
Family

{Family}

formatName_(instanceName, id)

static formatName_(instanceName: string, id: string): string;

Formats the table name to include the Bigtable cluster.

Parameters
NameDescription
instanceName string

The formatted instance name.

id string
Returns
TypeDescription
string

generateConsistencyToken()

generateConsistencyToken(): Promise<GenerateConsistencyTokenResponse>;
Returns
TypeDescription
Promise<GenerateConsistencyTokenResponse>

generateConsistencyToken(callback)

generateConsistencyToken(callback: GenerateConsistencyTokenCallback): void;
Parameter
NameDescription
callback GenerateConsistencyTokenCallback
Returns
TypeDescription
void

get(options)

get(options?: GetTableOptions): Promise<GetTableResponse>;
Parameter
NameDescription
options GetTableOptions
Returns
TypeDescription
Promise<GetTableResponse>

get(options, callback)

get(options: GetTableOptions, callback: GetTableCallback): void;
Parameters
NameDescription
options GetTableOptions
callback GetTableCallback
Returns
TypeDescription
void

get(callback)

get(callback: GetTableCallback): void;
Parameter
NameDescription
callback GetTableCallback
Returns
TypeDescription
void

getFamilies(gaxOptions)

getFamilies(gaxOptions?: CallOptions): Promise<GetFamiliesResponse>;
Parameter
NameDescription
gaxOptions CallOptions
Returns
TypeDescription
Promise<GetFamiliesResponse>

getFamilies(gaxOptions, callback)

getFamilies(gaxOptions: CallOptions, callback: GetFamiliesCallback): void;
Parameters
NameDescription
gaxOptions CallOptions
callback GetFamiliesCallback
Returns
TypeDescription
void

getFamilies(callback)

getFamilies(callback: GetFamiliesCallback): void;
Parameter
NameDescription
callback GetFamiliesCallback
Returns
TypeDescription
void

getIamPolicy(options)

getIamPolicy(options?: GetIamPolicyOptions): Promise<[Policy]>;
Parameter
NameDescription
options GetIamPolicyOptions
Returns
TypeDescription
Promise<[Policy]>

getIamPolicy(options, callback)

getIamPolicy(options: GetIamPolicyOptions, callback: GetIamPolicyCallback): void;
Parameters
NameDescription
options GetIamPolicyOptions
callback GetIamPolicyCallback
Returns
TypeDescription
void

getMetadata(options)

getMetadata(options?: GetMetadataOptions): Promise<GetMetadataResponse>;
Parameter
NameDescription
options GetMetadataOptions
Returns
TypeDescription
Promise<GetMetadataResponse>

getMetadata(options, callback)

getMetadata(options: GetMetadataOptions, callback: GetMetadataCallback): void;
Parameters
NameDescription
options GetMetadataOptions
callback GetMetadataCallback
Returns
TypeDescription
void

getMetadata(callback)

getMetadata(callback: GetMetadataCallback): void;
Parameter
NameDescription
callback GetMetadataCallback
Returns
TypeDescription
void

getReplicationStates(gaxOptions)

getReplicationStates(gaxOptions?: CallOptions): Promise<GetReplicationStatesResponse>;
Parameter
NameDescription
gaxOptions CallOptions
Returns
TypeDescription
Promise<GetReplicationStatesResponse>

getReplicationStates(gaxOptions, callback)

getReplicationStates(gaxOptions: CallOptions, callback: GetReplicationStatesCallback): void;
Parameters
NameDescription
gaxOptions CallOptions
callback GetReplicationStatesCallback
Returns
TypeDescription
void

getReplicationStates(callback)

getReplicationStates(callback: GetReplicationStatesCallback): void;
Parameter
NameDescription
callback GetReplicationStatesCallback
Returns
TypeDescription
void

getRows(options)

getRows(options?: GetRowsOptions): Promise<GetRowsResponse>;
Parameter
NameDescription
options GetRowsOptions
Returns
TypeDescription
Promise<GetRowsResponse>

getRows(options, callback)

getRows(options: GetRowsOptions, callback: GetRowsCallback): void;
Parameters
NameDescription
options GetRowsOptions
callback GetRowsCallback
Returns
TypeDescription
void

getRows(callback)

getRows(callback: GetRowsCallback): void;
Parameter
NameDescription
callback GetRowsCallback
Returns
TypeDescription
void

insert(entries, gaxOptions)

insert(entries: Entry | Entry[], gaxOptions?: CallOptions): Promise<InsertRowsResponse>;
Parameters
NameDescription
entries Entry | Entry[]
gaxOptions CallOptions
Returns
TypeDescription
Promise<InsertRowsResponse>

insert(entries, gaxOptions, callback)

insert(entries: Entry | Entry[], gaxOptions: CallOptions, callback: InsertRowsCallback): void;
Parameters
NameDescription
entries Entry | Entry[]
gaxOptions CallOptions
callback InsertRowsCallback
Returns
TypeDescription
void

insert(entries, callback)

insert(entries: Entry | Entry[], callback: InsertRowsCallback): void;
Parameters
NameDescription
entries Entry | Entry[]
callback InsertRowsCallback
Returns
TypeDescription
void

mutate(entries, options)

mutate(entries: Entry | Entry[], options?: MutateOptions): Promise<MutateResponse>;
Parameters
NameDescription
entries Entry | Entry[]
options MutateOptions
Returns
TypeDescription
Promise<MutateResponse>

mutate(entries, options, callback)

mutate(entries: Entry | Entry[], options: MutateOptions, callback: MutateCallback): void;
Parameters
NameDescription
entries Entry | Entry[]
options MutateOptions
callback MutateCallback
Returns
TypeDescription
void

mutate(entries, callback)

mutate(entries: Entry | Entry[], callback: MutateCallback): void;
Parameters
NameDescription
entries Entry | Entry[]
callback MutateCallback
Returns
TypeDescription
void

row(key)

row(key: string): Row;

Get a reference to a table row.

Parameter
NameDescription
key string

The row key.

Returns
TypeDescription
Row

{Row}

sampleRowKeys(gaxOptions)

sampleRowKeys(gaxOptions?: CallOptions): Promise<SampleRowsKeysResponse>;
Parameter
NameDescription
gaxOptions CallOptions
Returns
TypeDescription
Promise<SampleRowsKeysResponse>

sampleRowKeys(gaxOptions, callback)

sampleRowKeys(gaxOptions: CallOptions, callback: SampleRowKeysCallback): void;
Parameters
NameDescription
gaxOptions CallOptions
callback SampleRowKeysCallback
Returns
TypeDescription
void

sampleRowKeys(callback)

sampleRowKeys(callback?: SampleRowKeysCallback): void;
Parameter
NameDescription
callback SampleRowKeysCallback
Returns
TypeDescription
void

sampleRowKeysStream(gaxOptions)

sampleRowKeysStream(gaxOptions?: CallOptions): any;

Returns a sample of row keys in the table as a readable object stream.

See for more details.

Parameter
NameDescription
gaxOptions CallOptions

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

Returns
TypeDescription
any

{stream}

setIamPolicy(policy, gaxOptions)

setIamPolicy(policy: Policy, gaxOptions?: CallOptions): Promise<SetIamPolicyResponse>;
Parameters
NameDescription
policy Policy
gaxOptions CallOptions
Returns
TypeDescription
Promise<SetIamPolicyResponse>

setIamPolicy(policy, callback)

setIamPolicy(policy: Policy, callback: SetIamPolicyCallback): void;
Parameters
NameDescription
policy Policy
callback SetIamPolicyCallback
Returns
TypeDescription
void

setIamPolicy(policy, gaxOptions, callback)

setIamPolicy(policy: Policy, gaxOptions: CallOptions, callback: SetIamPolicyCallback): void;
Parameters
NameDescription
policy Policy
gaxOptions CallOptions
callback SetIamPolicyCallback
Returns
TypeDescription
void

testIamPermissions(permissions, gaxOptions)

testIamPermissions(permissions: string | string[], gaxOptions?: CallOptions): Promise<TestIamPermissionsResponse>;
Parameters
NameDescription
permissions string | string[]
gaxOptions CallOptions
Returns
TypeDescription
Promise<TestIamPermissionsResponse>

testIamPermissions(permissions, callback)

testIamPermissions(permissions: string | string[], callback: TestIamPermissionsCallback): void;
Parameters
NameDescription
permissions string | string[]
callback TestIamPermissionsCallback
Returns
TypeDescription
void

testIamPermissions(permissions, gaxOptions, callback)

testIamPermissions(permissions: string | string[], gaxOptions: CallOptions, callback: TestIamPermissionsCallback): void;
Parameters
NameDescription
permissions string | string[]
gaxOptions CallOptions
callback TestIamPermissionsCallback
Returns
TypeDescription
void

truncate(gaxOptions)

truncate(gaxOptions?: CallOptions): Promise<TruncateResponse>;
Parameter
NameDescription
gaxOptions CallOptions
Returns
TypeDescription
Promise<TruncateResponse>

truncate(gaxOptions, callback)

truncate(gaxOptions: CallOptions, callback: TruncateCallback): void;
Parameters
NameDescription
gaxOptions CallOptions
callback TruncateCallback
Returns
TypeDescription
void

truncate(callback)

truncate(callback: TruncateCallback): void;
Parameter
NameDescription
callback TruncateCallback
Returns
TypeDescription
void

waitForReplication()

waitForReplication(): Promise<WaitForReplicationResponse>;
Returns
TypeDescription
Promise<WaitForReplicationResponse>

waitForReplication(callback)

waitForReplication(callback: WaitForReplicationCallback): void;
Parameter
NameDescription
callback WaitForReplicationCallback
Returns
TypeDescription
void