public sealed class SpannerParameter : DbParameter, IDbDataParameter, IDataParameter, ICloneableReference documentation and code samples for the Google.Cloud.Spanner.Data class SpannerParameter.
Represents a parameter to a SpannerCommand and optionally its mapping to DataSet columns.
Namespace
Google.Cloud.Spanner.DataAssembly
Google.Cloud.Spanner.Data.dll
Constructors
SpannerParameter()
public SpannerParameter()Initializes a new instance of the SpannerParameter class.
SpannerParameter(String, SpannerDbType, Object, String)
public SpannerParameter(string parameterName, SpannerDbType type, object value = null, string sourceColumn = null)Initializes a new instance of the SpannerParameter class.
| Parameters | |
|---|---|
| Name | Description |
parameterName |
StringThe name of the parameter. For Insert, Update and Delete commands, this name should be the name of a valid column in a Spanner table. In Select commands, this name should be the name of a parameter used in the SQL Query. This value is case sensitive. Must not be null. |
type |
SpannerDbTypeOne of the SpannerDbType values that indicates the type of the parameter. Must not be null. |
value |
ObjectAn object that is the value of the SpannerParameter. May be null. |
sourceColumn |
StringThe name of the DataTable source column (SourceColumn) if this SpannerParameter is used in a call to Update. May be null. |
Properties
CommitTimestamp
public static object CommitTimestamp { get; }Returns a value that will be replaced with a commit timestamp on insert or update. Only suitable for Timestamp values.
| Property Value | |
|---|---|
| Type | Description |
Object |
|
DbType
public override DbType DbType { get; set; }Specifies the data type of a field, a property, or a Parameter object of a .NET Framework data provider.
| Property Value | |
|---|---|
| Type | Description |
DbType |
|
Using DbType of VarNumeric will always default to SpannerDbType of SpannerNumeric and never to PgNumeric.
Direction
public override ParameterDirection Direction { get; set; }| Property Value | |
|---|---|
| Type | Description |
ParameterDirection |
|
IsNullable
public override bool IsNullable { get; set; }| Property Value | |
|---|---|
| Type | Description |
Boolean |
|
ParameterName
public override string ParameterName { get; set; }| Property Value | |
|---|---|
| Type | Description |
String |
|
Size
public override int Size { get; set; }| Property Value | |
|---|---|
| Type | Description |
Int32 |
|
SourceColumn
public override string SourceColumn { get; set; }| Property Value | |
|---|---|
| Type | Description |
String |
|
SourceColumnNullMapping
public override bool SourceColumnNullMapping { get; set; }| Property Value | |
|---|---|
| Type | Description |
Boolean |
|
SourceVersion
public override DataRowVersion SourceVersion { get; set; }| Property Value | |
|---|---|
| Type | Description |
DataRowVersion |
|
SpannerDbType
public SpannerDbType SpannerDbType { get; set; }The SpannerDbType of the parameter or column. This should match the type as defined in Spanner or as defined by the result of a SQL Query.
| Property Value | |
|---|---|
| Type | Description |
SpannerDbType |
|
Value
public override object Value { get; set; }| Property Value | |
|---|---|
| Type | Description |
Object |
|
Methods
Clone()
public object Clone()| Returns | |
|---|---|
| Type | Description |
Object |
|
ResetDbType()
public override void ResetDbType()