Class: Row

Row

new Row

Represents the columns in a row

Parameters:
Name Type Description
data Object The data returned from the cql request
schema Object The schema returned from the cql request
Source:
  • row.js, line 11

Methods

forEach

Overrides the Array.forEach to callback with (name, value, timestamp, ttl)

Parameters:
Name Type Description
callback Function The callback to invoke once for each column in the Row
Source:
  • row.js, line 94

get

Adds the ability to get a column by its name rather than by its array index

Parameters:
Name Type Description
name String The name of the column to get
Source:
  • row.js, line 107
Returns:
a tuple of the column name, timestamp, ttl and value
Type
Object

inspect

Inspect method for columns

Source:
  • row.js, line 114

nameSlice

Slices out columns based on their name

Parameters:
Name Type Description
start String The starting string
end String The ending string
Source:
  • row.js, line 139
Returns:
Row with the sliced out columns
Type
Row

slice

Slices out columns based ont their index

Parameters:
Name Type Description
start Number Required. An integer that specifies where to start the selection (The first columns has an index of 0). You can also use negative numbers to select from the end of the row
end Number Optional. An integer that specifies where to end the selection. If omitted, slice() selects all elements from the start position and to the end of the row
Source:
  • row.js, line 162
Returns:
Row with the sliced out columns
Type
Row

toString

ToString method for columns

Source:
  • row.js, line 173
See:

<static> fromThrift

Create a row object using data returned from a thrift request

Parameters:
Name Type Description
key String The key of the row
columns Array The response from the thrift request
cf ColumnFamily The column family creating the row
Source:
  • row.js, line 64