当前位置: 首页>>代码示例>>C#>>正文


C# IDataReader.GetAsNullableNumeric方法代码示例

本文整理汇总了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;
 }
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:16,代码来源:OracleSchemaLoader.Columns.cs

示例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;
 }
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:17,代码来源:FirebirdSchemaLoader.StoredProcedures.cs

示例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;
 }
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:19,代码来源:FirebirdSchemaLoader.Columns.cs

示例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;
 }
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:22,代码来源:MySqlSchemaLoader.Columns.cs

示例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;
        }
开发者ID:nlhepler,项目名称:mono,代码行数:23,代码来源:PgsqlSchemaLoader.Columns.cs


注:本文中的IDataReader.GetAsNullableNumeric方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。