Click or drag to resize

SphinxQLDataReader Class

Reads a forward-only stream of rows from Sphinx. This class cannot be inherited.
Inheritance Hierarchy

Namespace:  SphinxConnector.SphinxQL
Assembly:  SphinxConnector (in SphinxConnector.dll) Version: 5.3.0
Syntax
public sealed class SphinxQLDataReader : DbDataReader

The SphinxQLDataReader type exposes the following members.

Properties
  NameDescription
Public propertyDepth
Gets a value indicating the depth of nesting for the current row. Always returns 0.
(Overrides DbDataReaderDepth.)
Public propertyFieldCount
Gets the number of columns in the current row.
(Overrides DbDataReaderFieldCount.)
Public propertyHasRows
Gets a value that indicates whether this SphinxQLDataReader contains one or more rows.
(Overrides DbDataReaderHasRows.)
Public propertyIsClosed
Gets a value indicating whether the SphinxQLDataReader is closed.
(Overrides DbDataReaderIsClosed.)
Public propertyItemInt32
Gets the Object with the specified ordinal.
(Overrides DbDataReaderItemInt32.)
Public propertyItemString
Gets the Object with the specified name.
(Overrides DbDataReaderItemString.)
Public propertyRecordsAffected
Gets the number of rows changed, inserted, or deleted by execution of the SphinxQL statement.
(Overrides DbDataReaderRecordsAffected.)
Public propertyVisibleFieldCount
Gets the number of fields in the DbDataReader that are not hidden.
(Inherited from DbDataReader.)
Top
Methods
  NameDescription
Public methodClose
Closes the SphinxQLDataReader object.
(Overrides DbDataReaderClose.)
Public methodCloseAsync
Asynchronously closes the SphinxQLDataReader object.
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose
Releases all resources used by the current instance of the DbDataReader class.
(Inherited from DbDataReader.)
Public methodDisposeAsync
Asynchronously dispose the SphinxQLDataReader object.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetBoolean(Int32)
Gets the value of the specified column as a Boolean.
(Overrides DbDataReaderGetBoolean(Int32).)
Public methodGetBoolean(String)
Gets the value of the specified column as a Boolean.
Public methodGetByte
Gets the value of the specified column as a byte.
(Overrides DbDataReaderGetByte(Int32).)
Public methodGetBytes
Reads a stream of bytes from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset. Currently not supported.
(Overrides DbDataReaderGetBytes(Int32, Int64, Byte, Int32, Int32).)
Public methodGetChar(Int32)
Gets the value of the specified column as a single character.
(Overrides DbDataReaderGetChar(Int32).)
Public methodGetChar(String)
Gets the value of the specified column as a single character.
Public methodGetChars
Reads a stream of characters from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset. Currently not supported.
(Overrides DbDataReaderGetChars(Int32, Int64, Char, Int32, Int32).)
Public methodGetData
Returns a DbDataReader object for the requested column ordinal.
(Inherited from DbDataReader.)
Public methodGetDataTypeName
Gets the name of the data type of the specified column.
(Overrides DbDataReaderGetDataTypeName(Int32).)
Public methodGetDateTime(Int32)
Gets the value of the specified column as a DateTime object.
(Overrides DbDataReaderGetDateTime(Int32).)
Public methodGetDateTime(String)
Gets the value of the specified column as a DateTime object.
Public methodGetDecimal(Int32)
Gets the value of the specified column as a Decimal object.
(Overrides DbDataReaderGetDecimal(Int32).)
Public methodGetDecimal(String)
Gets the value of the specified column as a Decimal object.
Public methodGetDouble(Int32)
Gets the value of the specified column as a double-precision floating point number.
(Overrides DbDataReaderGetDouble(Int32).)
Public methodGetDouble(String)
Gets the value of the specified column as a double-precision floating point number.
Public methodGetEnumerator
Returns an IEnumerator that can be used to iterate through the rows in the data reader.
(Overrides DbDataReader.GetEnumerator.)
Public methodGetFieldType
Gets the data type of the specified column.
(Overrides DbDataReaderGetFieldType(Int32).)
Public methodGetFieldValueT
Synchronously gets the value of the specified column as a type.
(Inherited from DbDataReader.)
Public methodGetFieldValueAsyncT(Int32)
Asynchronously gets the value of the specified column as a type.
(Inherited from DbDataReader.)
Public methodGetFieldValueAsyncT(Int32, CancellationToken)
Asynchronously gets the value of the specified column as a type.
(Inherited from DbDataReader.)
Public methodGetFloat(Int32)
Gets the value of the specified column as a single-precision floating point number.
(Overrides DbDataReaderGetFloat(Int32).)
Public methodGetFloat(String)
Gets the value of the specified column as a single-precision floating point number.
Public methodGetGuid
Gets the value of the specified column as a globally-unique identifier (GUID).
(Overrides DbDataReaderGetGuid(Int32).)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetInt16(Int32)
Gets the value of the specified column as a 16-bit signed integer.
(Overrides DbDataReaderGetInt16(Int32).)
Public methodGetInt16(String)
Gets the value of the specified column as a 16-bit signed integer.
Public methodGetInt32(Int32)
Gets the value of the specified column as a 32-bit signed integer.
(Overrides DbDataReaderGetInt32(Int32).)
Public methodGetInt32(String)
Gets the value of the specified column as a 32-bit signed integer.
Public methodGetInt64(Int32)
Gets the value of the specified column as a 64-bit signed integer.
(Overrides DbDataReaderGetInt64(Int32).)
Public methodGetInt64(String)
Gets the value of the specified column as a 64-bit signed integer.
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetMvaValues(Int32)
Gets the values of a multi value attribute.
Public methodGetMvaValues(String)
Gets the values of a multi value attribute.
Public methodGetName
Gets the name of the column, given the zero-based column ordinal.
(Overrides DbDataReaderGetName(Int32).)
Public methodGetOrdinal
Gets the column ordinal given the name of the column. This method is case insensitive.
(Overrides DbDataReaderGetOrdinal(String).)
Public methodGetProviderSpecificFieldType
Returns the provider-specific field type of the specified column.
(Inherited from DbDataReader.)
Public methodGetProviderSpecificValue
Gets the value of the specified column as an instance of Object.
(Inherited from DbDataReader.)
Public methodGetProviderSpecificValues
Gets all provider-specific attribute columns in the collection for the current row.
(Inherited from DbDataReader.)
Public methodGetSchemaTable
Returns a DataTable that describes the column metadata of the SphinxQLDataReader.
(Overrides DbDataReaderGetSchemaTable.)
Public methodGetSphinxTimestamp(Int32)
Gets the value of the specified column as a SphinxTimestamp.
Public methodGetSphinxTimestamp(String)
Gets the value of the specified column as a SphinxTimestamp.
Public methodGetStream
Retrieves data as a Stream.
(Inherited from DbDataReader.)
Public methodGetString(Int32)
Gets the value of the specified column as an instance of String.
(Overrides DbDataReaderGetString(Int32).)
Public methodGetString(String)
Gets the value of the specified column as an instance of String.
Public methodGetTextReader
Retrieves data as a TextReader.
(Inherited from DbDataReader.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUInt32(Int32)
Gets the value of the specified column as a 32-bit unsigned integer.
Public methodGetUInt32(String)
Gets the value of the specified column as a 32-bit unsigned integer.
Public methodGetUInt64(Int32)
Gets the value of the specified column as a 64-bit unsigned integer.
Public methodGetUInt64(String)
Gets the value of the specified column as a 64-bit unsigned integer.
Public methodGetValue(Int32)
Gets the value of the specified column as an instance of Object.
(Overrides DbDataReaderGetValue(Int32).)
Public methodGetValue(String)
Gets the value of the specified column as an instance of Object.
Public methodGetValues
Gets all attribute columns in the collection for the current row.
(Overrides DbDataReaderGetValues(Object).)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodIsDBNull(Int32)
Gets a value that indicates whether the column contains nonexistent or missing values.
(Overrides DbDataReaderIsDBNull(Int32).)
Public methodIsDBNull(String)
Gets a value that indicates whether the column contains nonexistent or missing values.
Public methodIsDBNullAsync(Int32)
An asynchronous version of IsDBNull(Int32), which gets a value that indicates whether the column contains non-existent or missing values.
(Inherited from DbDataReader.)
Public methodIsDBNullAsync(Int32, CancellationToken)
An asynchronous version of IsDBNull(Int32), which gets a value that indicates whether the column contains non-existent or missing values. Optionally, sends a notification that operations should be cancelled.
(Inherited from DbDataReader.)
Public methodCode exampleNextResult
Asynchronously advances the reader to the next result when reading the results of multiple queries.
(Overrides DbDataReaderNextResult.)
Public methodNextResultAsync
An asynchronous version of NextResult, which advances the reader to the next result when reading the results of a batch of statements.Invokes NextResultAsync(CancellationToken) with CancellationToken.None.
(Inherited from DbDataReader.)
Public methodCode exampleNextResultAsync(CancellationToken)
Asynchronously advances the reader to the next result when reading the results of multiple queries.
(Overrides DbDataReaderNextResultAsync(CancellationToken).)
Public methodRead
Advances the reader to the next record in a result set.
(Overrides DbDataReaderRead.)
Public methodReadAsync
An asynchronous version of Read, which advances the reader to the next record in a result set. This method invokes ReadAsync(CancellationToken) with CancellationToken.None.
(Inherited from DbDataReader.)
Public methodReadAsync(CancellationToken)
Asynchronously advances the reader to the next record in a result set.
(Overrides DbDataReaderReadAsync(CancellationToken).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Explicit Interface Implementations
Examples
The following example shows how to read data from Sphinx with the SphinxQLDataReader class.
using (SphinxQLConnection sphinxQLConnection = new SphinxQLConnection("Data Source = localhost;Port=9306"))
{
    SphinxQLCommand sphinxQLCommand = new SphinxQLCommand("SELECT * from sakila;", sphinxQLConnection);

    sphinxQLConnection.Open();

    using (SphinxQLDataReader sphinxQLDataReader = sphinxQLCommand.ExecuteReader())
    {
        while (sphinxQLDataReader.Read())
        {
            Console.WriteLine(sphinxQLDataReader.GetInt32("id"));
        }
    }
}
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also