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 callbackFunction 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 nameString 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 startString The starting string endString 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 startNumber 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 endNumber 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 keyString The key of the row columnsArray The response from the thrift request cfColumnFamily The column family creating the row - Source:
- row.js, line 64