Class SpannerParameterCollection (3.9.0)

public sealed class SpannerParameterCollection : DbParameterCollection, IDataParameterCollection, IList, ICollection, IEnumerable<SpannerParameter>, IEnumerable

Represents a collection of parameters associated with a SpannerCommand and their respective mappings to columns in a DataSet.

Inheritance

Object > MarshalByRefObject > DbParameterCollection > SpannerParameterCollection

Namespace

Google.Cloud.Spanner.Data

Assembly

Google.Cloud.Spanner.Data.dll

Constructors

SpannerParameterCollection(IEnumerable<SpannerParameter>)

public SpannerParameterCollection(IEnumerable<SpannerParameter> initialParameters = null)

Initializes a new SpannerParameterCollection with the given set of optional SpannerParameter objects.

Parameter
NameDescription
initialParametersIEnumerable<SpannerParameter>

The initial parameters to include in the collection.

Properties

Count

public override int Count { get; }
Property Value
TypeDescription
Int32
Overrides

IsFixedSize

public override bool IsFixedSize { get; }
Property Value
TypeDescription
Boolean
Overrides

IsReadOnly

public override bool IsReadOnly { get; }
Property Value
TypeDescription
Boolean
Overrides

IsSynchronized

public override bool IsSynchronized { get; }
Property Value
TypeDescription
Boolean
Overrides

SyncRoot

public override object SyncRoot { get; }
Property Value
TypeDescription
Object
Overrides

Methods

Add(Object)

public override int Add(object value)
Parameter
NameDescription
valueObject
Returns
TypeDescription
Int32
Overrides

Add(String, SpannerDbType)

public SpannerParameter Add(string parameterName, SpannerDbType dbType)
Parameters
NameDescription
parameterNameString

The 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. Must not be null

dbTypeSpannerDbType

One of the SpannerDbType values that indicates the type of the parameter. Must not be null.

Returns
TypeDescription
SpannerParameter

The parameter which has been added.

Add(String, SpannerDbType, Object)

public SpannerParameter Add(string parameterName, SpannerDbType dbType, object value)
Parameters
NameDescription
parameterNameString

The 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. Must not be null.

dbTypeSpannerDbType

One of the SpannerDbType values that indicates the type of the parameter. Must not be null.

valueObject

An object that is the value of the SpannerParameter. May be null.

Returns
TypeDescription
SpannerParameter

The parameter which has been added.

AddRange(Array)

public override void AddRange(Array values)
Parameter
NameDescription
valuesArray
Overrides

Clear()

public override void Clear()
Overrides

Clone()

public SpannerParameterCollection Clone()

Clones the collection.

Returns
TypeDescription
SpannerParameterCollection

A cloned copy of this instance.

Contains(Object)

public override bool Contains(object value)
Parameter
NameDescription
valueObject
Returns
TypeDescription
Boolean
Overrides

Contains(String)

public override bool Contains(string value)
Parameter
NameDescription
valueString
Returns
TypeDescription
Boolean
Overrides

CopyTo(Array, Int32)

public override void CopyTo(Array array, int index)
Parameters
NameDescription
arrayArray
indexInt32
Overrides

GetEnumerator()

public override IEnumerator GetEnumerator()
Returns
TypeDescription
IEnumerator
Overrides

GetParameter(Int32)

protected override DbParameter GetParameter(int index)
Parameter
NameDescription
indexInt32
Returns
TypeDescription
DbParameter
Overrides

GetParameter(String)

protected override DbParameter GetParameter(string parameterName)
Parameter
NameDescription
parameterNameString
Returns
TypeDescription
DbParameter
Overrides

IndexOf(Object)

public override int IndexOf(object value)
Parameter
NameDescription
valueObject
Returns
TypeDescription
Int32
Overrides

IndexOf(String)

public override int IndexOf(string parameterName)
Parameter
NameDescription
parameterNameString
Returns
TypeDescription
Int32
Overrides

Insert(Int32, Object)

public override void Insert(int index, object value)
Parameters
NameDescription
indexInt32
valueObject
Overrides

Remove(Object)

public override void Remove(object value)
Parameter
NameDescription
valueObject
Overrides

RemoveAt(Int32)

public override void RemoveAt(int index)
Parameter
NameDescription
indexInt32
Overrides

RemoveAt(String)

public override void RemoveAt(string parameterName)
Parameter
NameDescription
parameterNameString
Overrides

SetParameter(Int32, DbParameter)

protected override void SetParameter(int index, DbParameter value)
Parameters
NameDescription
indexInt32
valueDbParameter
Overrides

SetParameter(String, DbParameter)

protected override void SetParameter(string parameterName, DbParameter value)
Parameters
NameDescription
parameterNameString
valueDbParameter
Overrides

Explicit Interface Implementations

IEnumerable<SpannerParameter>.GetEnumerator()

IEnumerator<SpannerParameter> IEnumerable<SpannerParameter>.GetEnumerator()
Returns
TypeDescription
IEnumerator<SpannerParameter>