Was this page helpful?
Caution
You're viewing documentation for an unstable version of ScyllaDB Node.js Driver. Switch to the latest stable version.
Row¶
types~Row(columns)
Represents a result row
Constructor¶
new Row(columns)
Creates Row from array of column names. Column names can be provided either as array of strings or array of objects with property name representing column name. Any other metadata will be ignored
Parameters:
| Name | Type | Description |
|---|---|---|
columns |
Array<(string|{name: string})> |
Source
Methods¶
forEach(callback)
Executes the callback for each field in the row, containing the value as first parameter followed by the columnName
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function |
Source
get(columnName)
Returns the cell value.
Parameters:
| Name | Type | Description |
|---|---|---|
columnName |
String | Number | Name or index of the column |
Source
keys() → {Array<any>}
Returns an array of the column names of the row
Source
Returns:
- Type
- Array<any>
values() → {Array<any>}
Returns an array of the values of the row
Source
Returns:
- Type
- Array<any>