コード例 #1
0
ファイル: DbDatabase.cs プロジェクト: janproch/datadmin
 /// <summary>
 /// creates deep copy of database structure and filters database members
 /// </summary>
 /// <param name="src"></param>
 /// <param name="dbmem"></param>
 public DatabaseStructure(IDatabaseStructure src, DatabaseStructureMembers dbmem)
     : base(src)
 {
     Initialize();
     Dialect           = src.Dialect;
     ForceSingleSchema = src.ForceSingleSchema;
     foreach (ITableStructure o in src.Tables)
     {
         if (dbmem == null || dbmem.HasTableDetails(o.FullName))
         {
             Tables.Add(new TableStructure(o));
         }
     }
     foreach (ISchemaStructure o in src.Schemata)
     {
         Schemata.Add(new SchemaStructure(o));
     }
     foreach (ICollationStructure o in src.Collations)
     {
         Collations.Add(new CollationStructure(o));
     }
     foreach (ICharacterSetStructure o in src.CharacterSets)
     {
         CharacterSets.Add(new CharacterSetStructure(o));
     }
     foreach (IDomainStructure o in src.Domains)
     {
         Domains.Add(new DomainStructure(o));
     }
     foreach (string objtype in src.SpecificObjects.Keys)
     {
         var col = new SpecificObjectCollection(this);
         SpecificObjects[objtype] = col;
         foreach (ISpecificObjectStructure o in src.SpecificObjects[objtype])
         {
             if (dbmem == null || dbmem.HasSpecificObjectDetails(objtype, o.ObjectName))
             {
                 col.Add(new SpecificObjectStructure(o));
             }
         }
     }
     //FilledMembers = dbmem ?? src.FilledMembers.Clone();
 }
コード例 #2
0
 public bool CopyTableStructure(NameWithSchema name)
 {
     return(CopyMembers.HasTableDetails(name));
 }