Send feedback
Class Family (5.1.2)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
Create a Family object to interact with your table column families.
Package
@google-cloud/bigtable
Example
const { Bigtable } = require ( '@google-cloud/bigtable' );
const bigtable = new Bigtable ();
const instance = bigtable . instance ( 'my-instance' );
const table = instance . table ( 'prezzy' );
const family = table . family ( 'follows' );
Constructors
(constructor)(table, id)
constructor ( table : Table , id : string );
Constructs a new instance of the Family
class
Parameters
Name
Description
table
Table
id
string
Properties
bigtable
id
metadata ?: IColumnFamily ;
name
table
Methods
create(options)
create ( options ?: CreateFamilyOptions ) : Promise<CreateFamilyResponse> ;
create(options, callback)
create ( options : CreateFamilyOptions , callback : CreateFamilyCallback ) : void ;
Returns
Type
Description
void
create(callback)
create ( callback : CreateFamilyCallback ) : void ;
Returns
Type
Description
void
delete(gaxOptions)
delete ( gaxOptions ?: CallOptions ) : Promise<DeleteFamilyResponse> ;
Parameter
Name
Description
gaxOptions
CallOptions
delete(gaxOptions, callback)
delete ( gaxOptions : CallOptions , callback : DeleteFamilyCallback ) : void ;
Returns
Type
Description
void
delete(callback)
delete ( callback : DeleteFamilyCallback ) : void ;
Returns
Type
Description
void
exists(gaxOptions)
exists ( gaxOptions ?: CallOptions ) : Promise<FamilyExistsResponse> ;
Parameter
Name
Description
gaxOptions
CallOptions
exists(gaxOptions, callback)
exists ( gaxOptions : CallOptions , callback : FamilyExistsCallback ) : void ;
Returns
Type
Description
void
exists(callback)
exists ( callback : FamilyExistsCallback ) : void ;
Returns
Type
Description
void
static formatRule_ ( ruleObj : GcRule ) : IGcRule ;
Formats Garbage Collection rule into proto format.
Parameter
Name
Description
ruleObj
GcRule
The rule object.
Returns
Type
Description
IGcRule
{object}
Example
Family . formatRule ({
age : {
seconds : 10000 ,
nanos : 10000
},
versions : 2 ,
union : true
});
// {
// union: {
// rules: [
// {
// maxAge: {
// seconds: 10000,
// nanos: 10000
// }
// }, {
// maxNumVersions: 2
// }
// ]
// }
// }
get(options)
get ( options ?: GetFamilyOptions ) : Promise<GetFamilyResponse> ;
get(options, callback)
get ( options : GetFamilyOptions , callback : GetFamilyCallback ) : void ;
Returns
Type
Description
void
get(callback)
get ( callback : GetFamilyCallback ) : void ;
Returns
Type
Description
void
getMetadata ( gaxOptions ?: CallOptions ) : Promise<GetFamilyMetadataResponse> ;
Parameter
Name
Description
gaxOptions
CallOptions
getMetadata ( gaxOptions : CallOptions , callback : GetFamilyMetadataCallback ) : void ;
Returns
Type
Description
void
getMetadata ( callback : GetFamilyMetadataCallback ) : void ;
Returns
Type
Description
void
setMetadata ( metadata : SetFamilyMetadataOptions , gaxOptions ?: CallOptions ) : Promise<SetFamilyMetadataResponse> ;
setMetadata ( metadata : SetFamilyMetadataOptions , gaxOptions : CallOptions , callback : SetFamilyMetadataCallback ) : void ;
Returns
Type
Description
void
setMetadata ( metadata : SetFamilyMetadataOptions , callback : SetFamilyMetadataCallback ) : void ;
Returns
Type
Description
void
Send feedback
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-03-05 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-03-05 UTC."],[],[]]