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); }
private void ReloadTargetModel() { var dbmem = new DatabaseStructureMembers { TableList = true }; m_dstModel = new DatabaseStructure(m_target.InvokeLoadStructure(dbmem, null)); }
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)); }
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]); }
public IDatabaseStructure LoadDatabaseStructure(DatabaseStructureMembers members, IProgressInfo progress) { Reload(); return(DbStruct); }