C# Класс Negri.Wot.Sql.DataUtils

Показать файл Открыть проект

Открытые методы

Метод Описание
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