예제 #1
0
 public string[] GetEngines()
 {
     if (m_engines == null)
     {
         var dbmem = new DatabaseStructureMembers();
         dbmem.SpecificObjectOverride["mysql.engine"]            = new SpecificObjectMembers();
         dbmem.SpecificObjectOverride["mysql.engine"].ObjectList = true;
         IDatabaseStructure cat = m_db.InvokeLoadStructure(dbmem, null);
         List <string>      res = new List <string>();
         if (cat.SpecificObjects.ContainsKey("mysql.engine"))
         {
             foreach (var c in cat.SpecificObjects["mysql.engine"])
             {
                 res.Add(c.ObjectName.Name);
             }
         }
         else
         {
             res.Add("InnoDB");
             res.Add("MyISAM");
         }
         m_engines = res.ToArray();
     }
     return(m_engines);
 }
예제 #2
0
        private void ReloadTargetModel()
        {
            var dbmem = new DatabaseStructureMembers {
                TableList = true
            };

            m_dstModel = new DatabaseStructure(m_target.InvokeLoadStructure(dbmem, null));
        }
예제 #3
0
        private void ReloadSourceModel()
        {
            var dbmem = new DatabaseStructureMembers {
                TableList = true
            };

            dbmem.SpecificObjectOverride["view"] = new SpecificObjectMembers {
                ObjectList = true
            };
            m_srcModel = new DatabaseStructure(m_source.InvokeLoadStructure(dbmem, null));
        }
예제 #4
0
        public ITableStructure GetModel(IDatabaseSource conn)
        {
            var dbmem = new DatabaseStructureMembers
            {
                TableFilter = new List <NameWithSchema> {
                    Table
                },
                TableMembers = TableStructureMembers.Columns | TableStructureMembers.PrimaryKey
            };
            var dbs = conn.LoadDatabaseStructure(dbmem, null);

            return(dbs.Tables[Table]);
        }
예제 #5
0
 public IDatabaseStructure LoadDatabaseStructure(DatabaseStructureMembers members, IProgressInfo progress)
 {
     Reload();
     return(DbStruct);
 }