public IList<Schema> GetSchemas(net.datacowboy.SqlServerDatabaseDocumentationGenerator.Model.Database parent)
        {
            //get schemas
            List<Schema> schemaList = this.queryForSchemas();

            //get tables for each schema
            if (schemaList != null && schemaList.Count > 0)
            {
                var tableInspector = new TableInspector(this.peta);

                var viewInspector = new ViewInspector(this.peta);

                var sprocInspector = new StoredProcedureInspector(this.peta);

                var scalarUdfInspector = new ScalarFunctionInspector(this.peta);

                var tableUdfInspector = new TableFunctionInspector(this.peta);

                Schema schema = null;

                for (int i = 0; i < schemaList.Count; i++)
                {
                    schema = schemaList[i];

                    schema.Tables = tableInspector.GetTables(schema);
                    schema.Views = viewInspector.GetViews(schema);
                    schema.StoredProcedures = sprocInspector.GetStoredProcedures(schema);
                    schema.ScalarFunctions = scalarUdfInspector.GetScalarFunctions(schema);
                    schema.TableFunctions = tableUdfInspector.GetTableFunctions(schema);

                    schema.Parent = parent;
                }

            }

            return schemaList;
        }
Beispiel #2
0
        public IList <Schema> GetSchemas(net.datacowboy.SqlServerDatabaseDocumentationGenerator.Model.Database parent)
        {
            //get schemas
            List <Schema> schemaList = this.queryForSchemas();

            //get tables for each schema
            if (schemaList != null && schemaList.Count > 0)
            {
                var tableInspector = new TableInspector(this.peta);

                var viewInspector = new ViewInspector(this.peta);

                var sprocInspector = new StoredProcedureInspector(this.peta);

                var scalarUdfInspector = new ScalarFunctionInspector(this.peta);

                var tableUdfInspector = new TableFunctionInspector(this.peta);

                Schema schema = null;

                for (int i = 0; i < schemaList.Count; i++)
                {
                    schema = schemaList[i];

                    schema.Tables           = tableInspector.GetTables(schema);
                    schema.Views            = viewInspector.GetViews(schema);
                    schema.StoredProcedures = sprocInspector.GetStoredProcedures(schema);
                    schema.ScalarFunctions  = scalarUdfInspector.GetScalarFunctions(schema);
                    schema.TableFunctions   = tableUdfInspector.GetTableFunctions(schema);

                    schema.Parent = parent;
                }
            }

            return(schemaList);
        }