Gets a value that indicates whether the SpannerDataReader contains one or more rows.
If any rows have been read, this will continue to return true even when there are no more rows.
The name of the column whose value will be returned. Must not be null.
Returns
Type
Description
T
The value of the column at the current row, converted to type T.
Type Parameter
Name
Description
T
The expected return type. If possible the return type will be converted to this type.
If conversion is requested between incompatible types, an InvalidOperationException
will be thrown.
If the conversion fails due to the contents returned (for example a string representing a
boolean does not have either 'true' or 'false') then a FormatException exception will be
thrown as documented by the Convert class.
When enabled, returns the schema of the query as a DataTable. This feature needs
to be enabled in the connection string via the EnableGetSchemaTable property.
DbDataAdapter will use this method automatically, but there is not enough information
available for it to do so to reliably manage data sets. This method returns null by default to
avoid this causing problems.
When the EnableGetSchemaTable property in the connection string is set to true, a
DataTable is returned with the following columns populated:
ColumnName (String): The name of the column
ColumnOrdinal (Int32): The ordinal value of the column
DataType (Type): The default CLR type of the column
ProviderType (SpannerDbType): The Spanner-specific data type of the column
The following additional columns are present in the table, but not currently populated:
ColumnSize
NumericPrecision
NumericScale
Future releases may expand the set of columns, or populate more of the existing columns.
GetSpannerDate(int)
public SpannerDate GetSpannerDate(int i)
Gets the value of the specified column as type SpannerDate.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[[["The `SpannerDataReader` class, part of the Google.Cloud.Spanner.Data namespace, provides a way to read a forward-only stream of rows from a data source within Google Cloud Spanner."],["This class inherits from `DbDataReader` and implements several interfaces, including `IEnumerable`, `IDataReader`, `IDataRecord`, `IDisposable`, and `IAsyncDisposable`, making it versatile for data access and management."],["It offers methods for retrieving data in various formats, such as `GetBoolean`, `GetByte`, `GetString`, `GetTimestamp`, and it also supports specific types like `SpannerDate`, `SpannerNumeric` and `PgNumeric`, facilitating direct access to native Cloud Spanner data types."],["The documentation indicates a range of available versions for `SpannerDataReader`, from version 3.5.0 up to 5.0.0-beta05, with the 5.0.0-beta05 being the most recent release, meaning users can use various versions depending on their needs."],["The `GetSchemaTable` method is available for fetching schema information, but it requires explicit activation through the connection string, whereas the `GetReadTimestamp` method allows retrieval of the read timestamp under certain conditions."]]],[]]