Example #1
0
 public DbTable(MetaContext context, DataRow row)
     : base(context)
 {
     this.Catalog = row.GetValue<string>("TABLE_CATALOG");
     this.Schema = row.GetValue<string>("TABLE_SCHEMA");
     this.Name = row.GetValue<string>("TABLE_NAME");
     this.TableType = row.GetValue<string>("TABLE_TYPE");
 }
 public static FactDimensions GetFactDimensionsFromRow(DataRow row)
 {
     return new FactDimensions
     {
         Howkey = row.GetValue(ConfigSettings.How3Key),
         Whatkey = row.GetValue(ConfigSettings.WhatKey),
         Wherekey = row.GetValue(ConfigSettings.Where4Key),
         Whenkey = row.GetValue(ConfigSettings.When3Key)
     };
 }
Example #3
0
        public DbRelation(MetaContext context, DataRow row)
            : base(context)
        {
            PkColumnRef = GetColumnInfo(context, row, "PK");
            PkOrdinalPosition = row.GetValue<int>("PK_ORDINAL_POSITION");

            FkColumnRef = GetColumnInfo(context, row, "FK");
            FkOrdinalPosition = row.GetValue<int>("FK_ORDINAL_POSITION");

            Name = row.GetValue<string>("FK_NAME");
        }
Example #4
0
 private DbColumnName GetColumnInfo(MetaContext context, DataRow row, string type)
 {
     return new DbColumnName(context)
     {
         Name = row.GetValue<string>(type + "_COLUMN_NAME"),
         TableRef = new DbTableName(context)
         {
             Name = row.GetValue<string>(type + "_TABLE_NAME"),
             Schema = row.GetValue<string>(type + "_TABLE_SCHEMA"),
             Catalog = row.GetValue<string>(type + "_TABLE_CATALOG")
         }
     };
 }
 public static Fact GetFactFromRow(DataRow row)
 {
     return new Fact
     {
         FactId = row.GetValue(ConfigSettings.Id)
     };
 }
Example #6
0
        /// <summary>
        /// Fill designation object from datarow
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private static Designation Fill(DataRow item)
        {
            if (item == null) return null;

            Designation retObj = new Designation();
            retObj.DesignationID = item.GetIntValue("DesignationID");
            retObj.DesignationName = item.GetValue("DesignationName");

            return retObj;
        }
 private static bool IsRowValid(DataRow row)
 {
     return !string.IsNullOrEmpty(row.GetValue(ConfigSettings.Id));
 }
Example #8
0
        public DbColumn(MetaContext context, DbTableName table, DataRow row)
            : base(context)
        {
            BaseColumnRef = new DbColumnName(context)
            {
                Name = row.GetValue<string>("BaseColumnName"),
                TableRef = new DbTableName(context)
                {
                    Catalog = row.GetValue<string>("BaseCatalogName"),
                    Name = row.GetValue<string>("BaseTableName"),
                    Schema = row.GetValue<string>("BaseSchemaName")
                }
            };

            Name = row.GetValue<string>("ColumnName");
            TableRef = table;

            AllowDBNull = row.GetValue<bool>("AllowDBNull");
            ColumnOrdinal = row.GetValue<int>("ColumnOrdinal");
            ColumnSize = row.GetValue<int>("ColumnSize");
            DataType = row.GetValue<Type>("DataType");
            IsAutoIncrement = row.GetValue<bool>("IsAutoIncrement");
            IsKey = row.GetValue<bool>("IsKey");
            IsLong = row.GetValue<bool>("IsLong");
            IsHidden = row.GetValue<bool>("IsHidden");
            IsReadOnly = row.GetValue<bool>("IsReadOnly");
            IsRowVersion = row.GetValue<bool>("IsRowVersion");
            IsUnique = row.GetValue<bool>("IsUnique");
            NumericPrecision = row.GetValue<int>("NumericPrecision");
            NumericScale = row.GetValue<int>("NumericScale");
            ProviderType = row.GetValue<string>("ProviderType");
            DataTypeName = row.GetValue<string>("DataTypeName");
        }