C# 클래스 Negri.Wot.Sql.DataUtils

파일 보기 프로젝트 열기: negri/wotclans

공개 메소드들

메소드 설명
GetBytes ( IDataRecord reader, int index ) : byte[]

Gets the bytes.

GetDate ( IDataRecord dr, int index ) : DateTime

Retorna somente a DATA

GetDateTimeUtc ( IDataRecord reader, int index ) : DateTime

Gets the date time UTC.

GetNonNullValue ( IDataRecord dr, int index ) : T

Obtem um valor que NÃO pode estar nulo no BD.

A vantagem sobre IDateRecord.GetValue é que caso o campo esteja nulo no BD a exceção mostrara o ordinal do campo com problemas.

GetNullableDate ( IDataRecord dr, int index ) : DateTime?

Retorna somente a DATA (null caso seja nulo no BD)

GetNullableDateTimeUtc ( IDataRecord reader, int index ) : DateTime?

Gets the date time UTC.

GetNullableString ( IDataRecord dr, int index ) : string

Retorna uma string que pode estar nula no BD. Nesse caso retornara string.Empty

GetValueOrDefault ( IDataRecord dr, int index ) : T

Gets the value or default.

Normalize ( double d ) : double

메소드 상세

GetBytes() 공개 정적인 메소드

Gets the bytes.
public static GetBytes ( IDataRecord reader, int index ) : byte[]
reader IDataRecord The reader.
index int The field number.
리턴 byte[]

GetDate() 공개 정적인 메소드

Retorna somente a DATA
public static GetDate ( IDataRecord dr, int index ) : DateTime
dr IDataRecord
index int
리턴 DateTime

GetDateTimeUtc() 공개 정적인 메소드

Gets the date time UTC.
public static GetDateTimeUtc ( IDataRecord reader, int index ) : DateTime
reader IDataRecord The reader.
index int The field number.
리턴 DateTime

GetNonNullValue() 공개 정적인 메소드

Obtem um valor que NÃO pode estar nulo no BD.
A vantagem sobre IDateRecord.GetValue é que caso o campo esteja nulo no BD a exceção mostrara o ordinal do campo com problemas.
public static GetNonNullValue ( IDataRecord dr, int index ) : T
dr IDataRecord
index int
리턴 T

GetNullableDate() 공개 정적인 메소드

Retorna somente a DATA (null caso seja nulo no BD)
public static GetNullableDate ( IDataRecord dr, int index ) : DateTime?
dr IDataRecord
index int
리턴 DateTime?

GetNullableDateTimeUtc() 공개 정적인 메소드

Gets the date time UTC.
public static GetNullableDateTimeUtc ( IDataRecord reader, int index ) : DateTime?
reader IDataRecord The reader.
index int The field number.
리턴 DateTime?

GetNullableString() 공개 정적인 메소드

Retorna uma string que pode estar nula no BD. Nesse caso retornara string.Empty
public static GetNullableString ( IDataRecord dr, int index ) : string
dr IDataRecord
index int
리턴 string

GetValueOrDefault() 공개 정적인 메소드

Gets the value or default.
public static GetValueOrDefault ( IDataRecord dr, int index ) : T
dr IDataRecord The dr.
index int The index.
리턴 T

Normalize() 공개 정적인 메소드

public static Normalize ( double d ) : double
d double
리턴 double