C# 클래스 Azavea.Open.DAO.Util.CachingDataReader

A base class to save copying a whole lot of common code for different IDataReader implementations.
상속: IDataReader
파일 보기 프로젝트 열기: azavea/net-dao

보호된 프로퍼티들

프로퍼티 타입 설명
_config DataReaderConfig
_indexesByName int>.IDictionary
_log log4net.ILog
_namesByIndex string[]
_numCols int
_valsByIndex object[]

공개 메소드들

메소드 설명
Close ( ) : void

Closes the T:System.Data.IDataReader Object.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetBoolean ( int i ) : bool

Gets the value of the specified column as a Boolean.

GetByte ( int i ) : byte

Gets the 8-bit unsigned integer value of the specified column.

GetBytes ( int i, long fieldOffset, byte buffer, int bufferoffset, int length ) : long

Reads a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset.

GetChar ( int i ) : char

Gets the character value of the specified column.

GetChars ( int i, long fieldoffset, char buffer, int bufferoffset, int length ) : long

Reads a stream of characters from the specified column offset into the buffer as an array, starting at the given buffer offset.

GetData ( int i ) : IDataReader

Returns an T:System.Data.IDataReader for the specified column ordinal.

GetDataTypeName ( int i ) : string

Gets the data type information for the specified field.

GetDateTime ( int i ) : System.DateTime

Gets the date and time data value of the specified field.

GetDecimal ( int i ) : decimal

Gets the fixed-position numeric value of the specified field.

GetDouble ( int i ) : double

Gets the double-precision floating point number of the specified field.

GetFieldType ( int i ) : Type

Gets the T:System.Type information corresponding to the type of T:System.Object that would be returned from M:System.Data.IDataRecord.GetValue(System.Int32).

GetFloat ( int i ) : float

Gets the single-precision floating point number of the specified field.

GetGuid ( int i ) : System.Guid

Returns the GUID value of the specified field.

GetInt16 ( int i ) : short

Gets the 16-bit signed integer value of the specified field.

GetInt32 ( int i ) : int

Gets the 32-bit signed integer value of the specified field.

GetInt64 ( int i ) : long

Gets the 64-bit signed integer value of the specified field.

GetName ( int i ) : string

Gets the name for the field to find.

GetOrdinal ( string name ) : int

Return the index of the named field.

GetSchemaTable ( ) : DataTable

Returns a T:System.Data.DataTable that describes the column metadata of the T:System.Data.IDataReader.

GetString ( int i ) : string

Gets the string value of the specified field.

GetValue ( int i ) : object

Return the value of the specified field.

GetValues ( object values ) : int

Gets all the attribute fields in the collection for the current record.

IsDBNull ( int i ) : bool

Return whether the specified field is set to null.

NextResult ( ) : bool

Advances the data reader to the next result, when reading the results of batch SQL statements.

Read ( ) : bool

Advances the T:System.Data.IDataReader to the next record.

보호된 메소드들

메소드 설명
CachingDataReader ( DataReaderConfig config ) : System

Create the data reader.

ClearVals ( ) : void

Resets the values in _valsByIndex.

FetchNextRow ( ) : bool

Moves the cursor (or whatever the implementation equivilent is) to the next row if there is one.

GetCachedValue ( int i ) : object

Will only ever look up the value once.

GetDataObject ( int i ) : object

This method gets the actual data value from the actual data source.

비공개 메소드들

메소드 설명
this ( int i ) : objectIDataRecord.System

Gets the column located at the specified index.

this ( string name ) : objectIDataRecord.System

Gets the column with the specified name.

메소드 상세

CachingDataReader() 보호된 메소드

Create the data reader.
protected CachingDataReader ( DataReaderConfig config ) : System
config DataReaderConfig The column indexes in the data, keyed by column name. This may include /// columns not in the mapping.
리턴 System

ClearVals() 보호된 메소드

Resets the values in _valsByIndex.
protected ClearVals ( ) : void
리턴 void

Close() 공개 추상적인 메소드

Closes the T:System.Data.IDataReader Object.
public abstract Close ( ) : void
리턴 void

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

FetchNextRow() 보호된 추상적인 메소드

Moves the cursor (or whatever the implementation equivilent is) to the next row if there is one.
protected abstract FetchNextRow ( ) : bool
리턴 bool

GetBoolean() 공개 메소드

Gets the value of the specified column as a Boolean.
The index passed was outside the range of 0 through .
public GetBoolean ( int i ) : bool
i int The zero-based column ordinal.
리턴 bool

GetByte() 공개 메소드

Gets the 8-bit unsigned integer value of the specified column.
The index passed was outside the range of 0 through .
public GetByte ( int i ) : byte
i int The zero-based column ordinal.
리턴 byte

GetBytes() 공개 추상적인 메소드

Reads a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset.
The index passed was outside the range of 0 through .
public abstract GetBytes ( int i, long fieldOffset, byte buffer, int bufferoffset, int length ) : long
i int The zero-based column ordinal.
fieldOffset long The index within the field from which to start the read operation.
buffer byte The buffer into which to read the stream of bytes.
bufferoffset int The index for to start the read operation.
length int The number of bytes to read.
리턴 long

GetCachedValue() 보호된 메소드

Will only ever look up the value once.
protected GetCachedValue ( int i ) : object
i int 0-based column index.
리턴 object

GetChar() 공개 메소드

Gets the character value of the specified column.
The index passed was outside the range of 0 through .
public GetChar ( int i ) : char
i int The zero-based column ordinal.
리턴 char

GetChars() 공개 추상적인 메소드

Reads a stream of characters from the specified column offset into the buffer as an array, starting at the given buffer offset.
The index passed was outside the range of 0 through .
public abstract GetChars ( int i, long fieldoffset, char buffer, int bufferoffset, int length ) : long
i int The zero-based column ordinal.
fieldoffset long The index within the row from which to start the read operation.
buffer char The buffer into which to read the stream of bytes.
bufferoffset int The index for to start the read operation.
length int The number of bytes to read.
리턴 long

GetData() 공개 추상적인 메소드

Returns an T:System.Data.IDataReader for the specified column ordinal.
The index passed was outside the range of 0 through .
public abstract GetData ( int i ) : IDataReader
i int The index of the field to find.
리턴 IDataReader

GetDataObject() 보호된 추상적인 메소드

This method gets the actual data value from the actual data source.
protected abstract GetDataObject ( int i ) : object
i int Column number to get, zero-based.
리턴 object

GetDataTypeName() 공개 메소드

Gets the data type information for the specified field.
The index passed was outside the range of 0 through .
public GetDataTypeName ( int i ) : string
i int The index of the field to find.
리턴 string

GetDateTime() 공개 메소드

Gets the date and time data value of the specified field.
The index passed was outside the range of 0 through .
public GetDateTime ( int i ) : System.DateTime
i int The index of the field to find.
리턴 System.DateTime

GetDecimal() 공개 메소드

Gets the fixed-position numeric value of the specified field.
The index passed was outside the range of 0 through .
public GetDecimal ( int i ) : decimal
i int The index of the field to find.
리턴 decimal

GetDouble() 공개 메소드

Gets the double-precision floating point number of the specified field.
The index passed was outside the range of 0 through .
public GetDouble ( int i ) : double
i int The index of the field to find.
리턴 double

GetFieldType() 공개 추상적인 메소드

Gets the T:System.Type information corresponding to the type of T:System.Object that would be returned from M:System.Data.IDataRecord.GetValue(System.Int32).
The index passed was outside the range of 0 through .
public abstract GetFieldType ( int i ) : Type
i int The index of the field to find.
리턴 System.Type

GetFloat() 공개 메소드

Gets the single-precision floating point number of the specified field.
The index passed was outside the range of 0 through .
public GetFloat ( int i ) : float
i int The index of the field to find.
리턴 float

GetGuid() 공개 추상적인 메소드

Returns the GUID value of the specified field.
The index passed was outside the range of 0 through .
public abstract GetGuid ( int i ) : System.Guid
i int The index of the field to find.
리턴 System.Guid

GetInt16() 공개 메소드

Gets the 16-bit signed integer value of the specified field.
The index passed was outside the range of 0 through .
public GetInt16 ( int i ) : short
i int The index of the field to find.
리턴 short

GetInt32() 공개 메소드

Gets the 32-bit signed integer value of the specified field.
The index passed was outside the range of 0 through .
public GetInt32 ( int i ) : int
i int The index of the field to find.
리턴 int

GetInt64() 공개 메소드

Gets the 64-bit signed integer value of the specified field.
The index passed was outside the range of 0 through .
public GetInt64 ( int i ) : long
i int The index of the field to find.
리턴 long

GetName() 공개 추상적인 메소드

Gets the name for the field to find.
The index passed was outside the range of 0 through .
public abstract GetName ( int i ) : string
i int The index of the field to find.
리턴 string

GetOrdinal() 공개 메소드

Return the index of the named field.
public GetOrdinal ( string name ) : int
name string The name of the field to find.
리턴 int

GetSchemaTable() 공개 추상적인 메소드

Returns a T:System.Data.DataTable that describes the column metadata of the T:System.Data.IDataReader.
The is closed.
public abstract GetSchemaTable ( ) : DataTable
리턴 System.Data.DataTable

GetString() 공개 메소드

Gets the string value of the specified field.
The index passed was outside the range of 0 through .
public GetString ( int i ) : string
i int The index of the field to find.
리턴 string

GetValue() 공개 메소드

Return the value of the specified field.
The index passed was outside the range of 0 through .
public GetValue ( int i ) : object
i int The index of the field to find.
리턴 object

GetValues() 공개 추상적인 메소드

Gets all the attribute fields in the collection for the current record.
public abstract GetValues ( object values ) : int
values object An array of to copy the attribute fields into.
리턴 int

IsDBNull() 공개 메소드

Return whether the specified field is set to null.
The index passed was outside the range of 0 through .
public IsDBNull ( int i ) : bool
i int The index of the field to find.
리턴 bool

NextResult() 공개 추상적인 메소드

Advances the data reader to the next result, when reading the results of batch SQL statements.
public abstract NextResult ( ) : bool
리턴 bool

Read() 공개 메소드

Advances the T:System.Data.IDataReader to the next record.
public Read ( ) : bool
리턴 bool

프로퍼티 상세

_config 보호되어 있는 프로퍼티

The config object passed to the constructor. It is available in case the child class needs more data off of it.
protected DataReaderConfig _config
리턴 DataReaderConfig

_indexesByName 보호되어 있는 프로퍼티

The column indexes, keyed by the column name.
protected IDictionary _indexesByName
리턴 int>.IDictionary

_log 보호되어 있는 정적으로 프로퍼티

Logger that may be used by this class or its children.
protected static ILog,log4net _log
리턴 log4net.ILog

_namesByIndex 보호되어 있는 프로퍼티

The column names, in order from the data source.
protected string[] _namesByIndex
리턴 string[]

_numCols 보호되어 있는 프로퍼티

The number of columns that the data reader can read.
protected int _numCols
리턴 int

_valsByIndex 보호되어 있는 프로퍼티

The values for this row, in column order.
protected object[] _valsByIndex
리턴 object[]