Class Row
Assembly: Cassandra.dll
Syntax
public class Row : IEnumerable<object>, IEnumerable
Constructors
Row()
Initializes a new instance of the Cassandra.Row class
Declaration
Row(int, byte[][], CqlColumn[], Dictionary<string, int>)
Initializes a new instance of the Cassandra.Row class
Declaration
[Obsolete("This constructor is deprecated and to be removed in future versions. If you need to create mock instances of Row, use the parameter-less constructor and override GetValue<T>()")]
public Row(int protocolVersion, byte[][] values, CqlColumn[] columns, Dictionary<string, int> columnIndexes)
Parameters
Properties
ColumnIndexes
Gets or sets the index of the columns within the row
Declaration
protected Dictionary<string, int> ColumnIndexes { get; set; }
Property Value
Columns
Gets or sets the columns information
Declaration
protected CqlColumn[] Columns { get; set; }
Property Value
this[int]
Gets the stored value in the column specified by index
Declaration
public object this[int index] { get; }
Parameters
Type |
Name |
Description |
int |
index |
|
Property Value
this[string]
Gets the stored value in the column specified by name
Declaration
public object this[string name] { get; }
Parameters
Type |
Name |
Description |
string |
name |
|
Property Value
Length
Gets the total amount of values inside the row
Declaration
public int Length { get; }
Property Value
ProtocolVersion
Declaration
[Obsolete("This property is deprecated and to be removed in future versions.")]
protected int ProtocolVersion { get; set; }
Property Value
Values
Declaration
[Obsolete("This property is deprecated and to be removed in future versions.")]
protected byte[][] Values { get; set; }
Property Value
Type |
Description |
byte[][] |
|
Methods
GetColumn(string)
Gets a column information by name. Returns null if not found.
Declaration
public CqlColumn GetColumn(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetEnumerator()
Returns an enumerator that iterates through the row values from the first position to the last one.
Declaration
public IEnumerator<object> GetEnumerator()
Returns
GetValue(Type, int)
Gets the stored value in the column specified by index
Declaration
public object GetValue(Type type, int index)
Parameters
Type |
Name |
Description |
Type |
type |
Target type
|
int |
index |
Index of the column
|
Returns
GetValue(Type, string)
Gets the stored value in the column specified by name
Declaration
public object GetValue(Type type, string name)
Parameters
Type |
Name |
Description |
Type |
type |
Target type
|
string |
name |
Name of the column
|
Returns
GetValue<T>(int)
Gets the stored value in the column specified by index.
Declaration
public virtual T GetValue<T>(int index)
Parameters
Type |
Name |
Description |
int |
index |
Index of the column
|
Returns
Type Parameters
Name |
Description |
T |
Target type
|
GetValue<T>(string)
Gets the stored value in the column specified by name.
Declaration
public virtual T GetValue<T>(string name)
Parameters
Type |
Name |
Description |
string |
name |
Name of the column
|
Returns
Type Parameters
Name |
Description |
T |
Target type
|
IsNull(int)
Determines if the value in the column is null
Declaration
public virtual bool IsNull(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
IsNull(string)
Determines if the value in the column is null
Declaration
public bool IsNull(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
Implements