关系数据库元数据处理类(三) 创建查询元数据代理类
1 public class MetadataManager : IMetadata 2 { 3 private readonly IMetadata _metadata; 4 5 public MetadataManager(IMetadata metadata) 6 { 7 _metadata = metadata; 8 } 9 10 public Database CurrentDatabase { get; set; } 11 12 public Database GetDatabase(ISpecification<Database> specification) 13 { 14 return _metadata.GetDatabase(specification); 15 } 16 17 public List<Database> GetAllDatabase() 18 { 19 return _metadata.GetAllDatabase(); 20 } 21 22 public List<Database> FinDatabases(ISpecification<Database> specification) 23 { 24 return _metadata.FinDatabases(specification); 25 } 26 27 public Table GeTable(ISpecification<Table> specification) 28 { 29 return _metadata.GeTable(specification); 30 } 31 32 public List<Table> GetAllTable() 33 { 34 return _metadata.GetAllTable(); 35 } 36 37 public List<Table> FindTables(ISpecification<Table> specification) 38 { 39 return _metadata.FindTables(specification); 40 } 41 42 public Column GetColumn(ISpecification<Column> specification) 43 { 44 return _metadata.GetColumn(specification); 45 } 46 47 public List<Column> GetAllColumns() 48 { 49 return _metadata.GetAllColumns(); 50 } 51 52 public List<Column> FindColumns(ISpecification<Column> specification) 53 { 54 return _metadata.FindColumns(specification); 55 } 56 57 public List<Relation> GetAllRelation() 58 { 59 return _metadata.GetAllRelation(); 60 } 61 62 public Relation GeRelation(ISpecification<Relation> specification) 63 { 64 return _metadata.GeRelation(specification); 65 } 66 67 public List<Relation> FindRelations(ISpecification<Relation> specification) 68 { 69 return _metadata.FindRelations(specification); 70 } 71 }