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 Google.Cloud.Spanner.V1.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 latest version available for the `SpannerDataReader` class is 5.0.0-beta05, with version 4.6.0 being the most recent stable release."],["`SpannerDataReader` is a class designed to read a forward-only stream of rows from a data source, implementing several interfaces like `IEnumerable`, `IDataReader`, `IDataRecord`, `IDisposable`, and `IAsyncDisposable`."],["The `SpannerDataReader` class provides methods to retrieve data in various formats, such as `GetBoolean`, `GetByte`, `GetString`, `GetTimestamp` and many more, allowing for flexible data access."],["This class includes properties that allow for retrieving metadata like `Depth`, `FieldCount`, `HasRows`, `IsClosed` and `RecordsAffected`, allowing for a better understanding of the ongoing state."],["The `GetSchemaTable()` method provides schema information about the query, if enabled, by returning a `DataTable` with details on columns like `ColumnName`, `ColumnOrdinal`, `DataType`, and `ProviderType`."]]],[]]