Family
Source: family.
Create a Family object to interact with your table column families.
new Family(table, id)
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');
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
table |
|
|
|
|
id |
|
|
Methods
create([options], callback)
Create a column family.
Example
include:samples/document-snippets/family.js
region_tag:bigtable_create_family
Parameters
| Name | Type | Optional | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
options |
object |
Yes |
See Table#createFamily. |
||||||||||||||||
|
callback |
function() |
|
The callback function. Values in
|
delete([gaxOptions][, callback])
Delete the column family.
Example
include:samples/document-snippets/family.js
region_tag:bigtable_del_family
Parameters
| Name | Type | Optional | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
gaxOptions |
object |
Yes |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||
|
callback |
function() |
Yes |
The callback function. Values in
|
exists([gaxOptions], callback)
Check if the column family exists.
Example
include:samples/document-snippets/family.js
region_tag:bigtable_exists_family
Parameters
| Name | Type | Optional | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
gaxOptions |
object |
Yes |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||
|
callback |
function() |
|
The callback function. Values in
|
get([options])
Get a column family if it exists.
You may optionally use this to "get or create" an object by providing an
object with autoCreate set to true. Any extra configuration that is
normally required for the create method must be contained within this
object as well.
Example
include:samples/document-snippets/family.js
region_tag:bigtable_get_family
Parameters
| Name | Type | Optional | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
options |
object |
Yes |
Configuration object. Values in
|
||||||||||||
|
callback.error |
error |
|
An error returned while making this request. Value can be null. |
||||||||||||
|
callback.family |
|
The Family object. |
|||||||||||||
|
callback.apiResponse |
object |
|
The resource as it exists in the API. |
getMetadata([gaxOptions], callback)
Get the column family's metadata.
Example
include:samples/document-snippets/family.js
region_tag:bigtable_get_family_meta
Parameters
| Name | Type | Optional | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
gaxOptions |
object |
Yes |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||
|
callback |
function() |
|
The callback function. Values in
|
setMetadata(metadata[, gaxOptions], callback)
Set the column family's metadata.
See Table#createFamily for a detailed explanation of the arguments.
Example
include:samples/document-snippets/family.js
region_tag:bigtable_set_family_meta
Parameters
| Name | Type | Optional | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
metadata |
object |
|
Metadata object. Values in
|
||||||||||||
|
gaxOptions |
object |
Yes |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. |
||||||||||||
|
callback |
function() |
|
The callback function. Values in
|
- See also