Beispiel #1
0
        public IList <View> GetViews(Schema schema)
        {
            IList <View> viewList = this.getViewsForSchema(schema);



            if (viewList != null && viewList.Count > 0)
            {
                var columnInspector = new ColumnInspector(this.peta);

                var indexInspector = new IndexInspector(this.peta);

                for (int v = 0; v < viewList.Count; v++)
                {
                    var view = viewList[v];

                    view.Columns = columnInspector.GetColumns(view);

                    view.Indexes = indexInspector.GetIndexes(view);

                    view.Parent = schema;
                }
            }



            return(viewList);
        }
        public IList <Table> GetTables(Schema schema)
        {
            var tableList = this.queryForTables(schema);



            if (tableList != null && tableList.Count > 0)
            {
                Table table = null;

                var columnInspector = new ColumnInspector(this.peta);

                var indexInspector = new IndexInspector(this.peta);

                var foreignKeyInspector = new ForeignKeyInspector(this.peta);

                for (int i = 0; i < tableList.Count; i++)
                {
                    table             = tableList[i];
                    table.Columns     = columnInspector.GetColumns(table);
                    table.Indexes     = indexInspector.GetIndexes(table);
                    table.ForeignKeys = foreignKeyInspector.GetForeignKeys(table);
                    table.Parent      = schema;
                }
            }


            return(tableList);
        }
        public IList<View> GetViews(Schema schema)
        {
            IList<View> viewList = this.getViewsForSchema(schema);

            if (viewList != null && viewList.Count > 0)
            {
                var columnInspector = new ColumnInspector(this.peta);

                var indexInspector = new IndexInspector(this.peta);

                for (int v = 0; v < viewList.Count; v++)
                {
                   var view = viewList[v];

                    view.Columns = columnInspector.GetColumns(view);

                    view.Indexes = indexInspector.GetIndexes(view);

                    view.Parent = schema;

                }

            }

            return viewList;
        }
        public IList<Table> GetTables(Schema schema)
        {
            var tableList = this.queryForTables(schema);

            if (tableList != null && tableList.Count > 0)
            {
                Table table = null;

                var columnInspector = new ColumnInspector(this.peta);

                var indexInspector = new IndexInspector(this.peta);

                var foreignKeyInspector = new ForeignKeyInspector(this.peta);

                for (int i = 0; i < tableList.Count; i++)
                {
                    table = tableList[i];
                    table.Columns = columnInspector.GetColumns(table);
                    table.Indexes = indexInspector.GetIndexes(table);
                    table.ForeignKeys = foreignKeyInspector.GetForeignKeys(table);
                    table.Parent = schema;
                }

            }

            return tableList;
        }