Google.Cloud.Spanner.Data - Class SpannerParameterCollection (4.4.0)

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

Reference documentation and code samples for the Google.Cloud.Spanner.Data class SpannerParameterCollection.

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

Inheritance

object > MarshalByRefObject > DbParameterCollection > SpannerParameterCollection

Namespace

GoogleCloudGoogle.Cloud.SpannerData

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
initialParametersIEnumerableSpannerParameter

The initial parameters to include in the collection.

Properties

Count

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

IsFixedSize

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

IsReadOnly

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

IsSynchronized

public override bool IsSynchronized { get; }
Property Value
TypeDescription
bool
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
int
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
bool
Overrides

Contains(string)

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

CopyTo(Array, int)

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

GetEnumerator()

public override IEnumerator GetEnumerator()
Returns
TypeDescription
IEnumerator
Overrides

GetParameter(int)

protected override DbParameter GetParameter(int index)
Parameter
NameDescription
indexint
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
int
Overrides

IndexOf(string)

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

Insert(int, object)

public override void Insert(int index, object value)
Parameters
NameDescription
indexint
valueobject
Overrides

Remove(object)

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

RemoveAt(int)

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

RemoveAt(string)

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

SetParameter(int, DbParameter)

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

SetParameter(string, DbParameter)

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