本文整理汇总了C#中IDataReader.GetAsNullableNumeric方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.GetAsNullableNumeric方法的具体用法?C# IDataReader.GetAsNullableNumeric怎么用?C# IDataReader.GetAsNullableNumeric使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataReader
的用法示例。
在下文中一共展示了IDataReader.GetAsNullableNumeric方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadColumn
protected virtual IDataTableColumn ReadColumn(IDataReader rdr)
{
var column = new DataTableColumn();
int field = 0;
column.TableSchema = rdr.GetString(field++);
column.TableName = rdr.GetString(field++);
column.ColumnName = rdr.GetString(field++);
column.SqlType = rdr.GetString(field++);
column.Length = rdr.GetAsNullableNumeric<long>(field++);
column.Precision = rdr.GetAsNullableNumeric<int>(field++);
column.Scale = rdr.GetAsNullableNumeric<int>(field++);
string nullableStr = rdr.GetString(field++);
column.Nullable = nullableStr == "Y";
column.FullType = column.SqlType;
return column;
}
示例2: ReadProcedure
DataStoredProcedure ReadProcedure(IDataReader rdr)
{
DataStoredProcedure procedure = new DataStoredProcedure();
int field = 0;
procedure.TableSchema = rdr.GetAsString(field++);
procedure.Name = rdr.GetAsString(field++).Trim();
procedure.Type = rdr.GetAsString(field++);
procedure.ParameterName = rdr.GetAsString(field++).Trim();
procedure.IsOutputParameter = rdr.GetAsBool(field++);
procedure.ParameterType = rdr.GetAsString(field++).Trim();
procedure.Length = rdr.GetAsNullableNumeric<long>(field++);
procedure.Precision = rdr.GetAsNullableNumeric<int>(field++);
procedure.Scale = rdr.GetAsNullableNumeric<int>(field++);
procedure.DefaultValue = rdr.GetAsString(field++);
procedure.BodyContainsSelectStatement = rdr.GetAsBool(field++);
return procedure;
}
示例3: ReadColumn
protected virtual IDataTableColumn ReadColumn(IDataReader rdr)
{
var column = new DataTableColumn();
int field = 0;
column.TableSchema = rdr.GetAsString(field++);
column.TableName = rdr.GetAsString(field++).Trim();
column.ColumnName = rdr.GetAsString(field++).Trim();
column.Nullable = rdr.GetAsBool(field++);
column.SqlType = rdr.GetAsString(field++).Trim();
column.Generated = rdr.GetAsBool(field++);
//column.Unsigned = column.FullType.Contains("unsigned");
column.PrimaryKey = rdr.GetAsBool(field++);
column.Length = rdr.GetAsNullableNumeric<long>(field++);
column.Precision = rdr.GetAsNullableNumeric<int>(field++);
column.Scale = rdr.GetAsNullableNumeric<int>(field++);
column.DefaultValue = rdr.GetAsString(field++);
FormatFullType(column);
return column;
}
示例4: ReadColumn
protected virtual IDataTableColumn ReadColumn(IDataReader rdr)
{
var column = new DataTableColumn();
int field = 0;
column.TableSchema = rdr.GetAsString(field++);
column.TableName = rdr.GetAsString(field++);
column.ColumnName = rdr.GetAsString(field++);
string nullableStr = rdr.GetAsString(field++);
column.Nullable = nullableStr == "YES";
column.SqlType = rdr.GetAsString(field++);
var extra = rdr.GetAsString(field++);
column.Generated = extra == "auto_increment";
column.FullType = FormatFullType(rdr.GetAsString(field++));
column.Unsigned = column.FullType.Contains("unsigned");
string columnKey = rdr.GetAsString(field++);
column.PrimaryKey = columnKey == "PRI";
column.Length = rdr.GetAsNullableNumeric<long>(field++);
column.Precision = rdr.GetAsNullableNumeric<int>(field++);
column.Scale = rdr.GetAsNullableNumeric<int>(field++);
column.DefaultValue = rdr.GetAsString(field++);
return column;
}
示例5: ReadColumn
protected virtual IDataTableColumn ReadColumn(IDataReader rdr)
{
var column = new DataTableColumn();
int field = 0;
column.TableSchema = rdr.GetAsString(field++);
column.TableName = rdr.GetAsString(field++);
column.ColumnName = rdr.GetAsString(field++);
string nullableStr = rdr.GetAsString(field++);
column.Nullable = nullableStr == "YES";
column.SqlType = rdr.GetAsString(field++);
var domain_schema = rdr.GetAsString(field++);
var domain_name = rdr.GetAsString(field++);
column.DefaultValue = GetColumnDefaultValue(rdr.GetAsString(field++));
column.Generated = column.DefaultValue != null && column.DefaultValue.StartsWith("nextval(");
column.Length = rdr.GetAsNullableNumeric<long>(field++);
column.Precision = rdr.GetAsNullableNumeric<int>(field++);
column.Scale = rdr.GetAsNullableNumeric<int>(field++);
column.FullType = GetColumnFullType(domain_name, domain_schema, column);
return column;
}