Ejemplo n.º 1
0
 public SpecificObjectCollection SpecByType(string type)
 {
     if (!SpecificObjects.ContainsKey(type))
     {
         SpecificObjects[type] = new SpecificObjectCollection(this);
     }
     return((SpecificObjectCollection)SpecificObjects[type]);
 }
Ejemplo n.º 2
0
 /// <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();
 }