Class CqlParameter
Represents a Cql parameter.
Inherited Members
Namespace: Cassandra.Data
Assembly: Cassandra.dll
Syntax
public class CqlParameter : DbParameter, IDbDataParameter, IDataParameter
Constructors
CqlParameter()
Initializes a new instance of the CqlParameter class.
Declaration
public CqlParameter()
CqlParameter(string)
Initializes a new instance of the CqlParameter class.
Declaration
public CqlParameter(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name. |
CqlParameter(string, object)
Initializes a new instance of the CqlParameter class. The type of the parameter will be guessed from the value.
Declaration
public CqlParameter(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name. |
object | value | The value. |
Properties
DbType
Gets or sets the DbType of the parameter.
Declaration
public override DbType DbType { get; set; }
Property Value
Type | Description |
---|---|
DbType |
Overrides
Direction
Gets or sets a value indicating whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.
Declaration
public override ParameterDirection Direction { get; set; }
Property Value
Type | Description |
---|---|
ParameterDirection | One of the ParameterDirection values. The default is Input. |
Overrides
Exceptions
Type | Condition |
---|---|
NotSupportedException | Cql only supports input parameters |
IsNullable
Gets a value indicating whether the parameter accepts null values.
Declaration
public override bool IsNullable { get; set; }
Property Value
Type | Description |
---|---|
bool | true if null values are accepted; otherwise, false. The default is false. |
Overrides
ParameterName
Gets or sets the name of the IDataParameter.
Declaration
public override string ParameterName { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the IDataParameter. The default is an empty string. |
Overrides
Size
The size of the parameter.
Declaration
public override int Size { get; set; }
Property Value
Type | Description |
---|---|
int | Always returns 0. |
Overrides
SourceColumn
Gets or sets the name of the source column that is mapped to the DataSet and used for loading or returning the Value.
Declaration
public override string SourceColumn { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the source column that is mapped to the DataSet. The default is an empty string. |
Overrides
SourceColumnNullMapping
Sets or gets a value which indicates whether the source column is nullable. This allows DbCommandBuilder to correctly generate Update statements for nullable columns.
Declaration
public override bool SourceColumnNullMapping { get; set; }
Property Value
Type | Description |
---|---|
bool | true if the source column is nullable; false if it is not. |
Overrides
SourceVersion
Gets or sets the DataRowVersion to use when loading Value.
Declaration
public override DataRowVersion SourceVersion { get; set; }
Property Value
Type | Description |
---|---|
DataRowVersion | One of the DataRowVersion values. The default is Current. |
Overrides
Value
Gets or sets the value of the parameter. If no type information was provided earlier, the type of the parameter will be guessed from the value's type.
Declaration
public override object Value { get; set; }
Property Value
Type | Description |
---|---|
object | An object that is the value of the parameter. The default value is null. |
Overrides
Methods
ResetDbType()
Resets the DbType property to its original settings.
Declaration
public override void ResetDbType()