C# Class Negri.Wot.Sql.DataUtils

Afficher le fichier Open project: negri/wotclans

Méthodes publiques

Méthode Description
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

Method Details

GetBytes() public static méthode

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

GetDate() public static méthode

Retorna somente a DATA
public static GetDate ( IDataRecord dr, int index ) : DateTime
dr IDataRecord
index int
Résultat DateTime

GetDateTimeUtc() public static méthode

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

GetNonNullValue() public static méthode

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
Résultat T

GetNullableDate() public static méthode

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

GetNullableDateTimeUtc() public static méthode

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

GetNullableString() public static méthode

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
Résultat string

GetValueOrDefault() public static méthode

Gets the value or default.
public static GetValueOrDefault ( IDataRecord dr, int index ) : T
dr IDataRecord The dr.
index int The index.
Résultat T

Normalize() public static méthode

public static Normalize ( double d ) : double
d double
Résultat double