Ejemplo n.º 1
0
 public void VisitPartitionColumn(PartitionColumnModel item)
 {
     if (this._filter(item))
     {
         _items.Add(item);
     }
 }
Ejemplo n.º 2
0
        public override List <SubpartitionColumnDto_11> Resolve(DbContextOracle context, Action <SubpartitionColumnDto_11> action)
        {
            List <SubpartitionColumnDto_11> List = new List <SubpartitionColumnDto_11>();
            var db = context.Database;

            this.OracleContext = context;

            if (action == null)
            {
                action =
                    t =>
                {
                    if (t.Name.ExcludIfStartwith(t.Owner, Models.Configurations.ExcludeKindEnum.Table))
                    {
                        return;
                    }

                    string k = t.Owner + "." + t.Name;

                    var p = new PartitionColumnModel()
                    {
                        ColumnName     = t.ColumnName,
                        ColumnPosition = t.ColumnPosition.ToInt16(),
                    };

                    if (t.ObjectType == "TABLE")
                    {
                        TableModel table;
                        if (db.Tables.TryGet(k, out table))
                        {
                            table.BlocPartition.SubColumns.Add(p);
                        }
                    }
                    else if (t.ObjectType == "INDEX")
                    {
                        IndexModel index;
                        if (db.Indexes.TryGet(k, out index))
                        {
                            index.BlocPartition.SubColumns.Add(p);
                        }
                    }
                    else
                    {
                        System.Diagnostics.Debugger.Break();
                    }
                }
            }
            ;

            SubpartitionColumnQueryDescriptor_11 SubpartitionColumn = new SubpartitionColumnQueryDescriptor_11(context.Manager.ConnectionString);

            sql = string.Format(sql, TableQueryWhereCondition("l", "Owner"));

            using (var reader = context.Manager.ExecuteReader(CommandType.Text, sql, QueryBase.DbParams.ToArray()))
            {
                List = SubpartitionColumn.ReadAll(reader, action).ToList();
            }

            return(List);
        }
    }
Ejemplo n.º 3
0
 public void VisitPartitionColumn(PartitionColumnModel item)
 {
 }