public MySqlCollationSchemaCollection GetCollations(MySqlCharacterSetSchema characterSet) { MySqlCollationSchemaCollection collations = new MySqlCollationSchemaCollection(); using (IPooledDbConnection conn = connectionPool.Request()) { using (IDbCommand command = conn.CreateCommand(String.Format("SHOW COLLATION LIKE '{0}%';", characterSet.Name))) { try { using (IDataReader r = command.ExecuteReader()) { while (r.Read()) { MySqlCollationSchema collation = new MySqlCollationSchema(this); collation.Name = r.GetString(0); collation.CharacterSetName = r.GetString(1); collation.Id = r.GetInt32(2); collation.IsDefaultCollation = r.GetString(3) == "Yes" ? true : false; collation.IsCompiled = r.GetString(4) == "Yes" ? true : false; collation.SortLength = r.GetInt32(5); collations.Add(collation); } r.Close(); } } catch (Exception e) { QueryService.RaiseException(e); } finally { conn.Release(); } } } return(collations); }
public void Initialize(MySqlSchemaProvider provider) { ClearCombos(); MySqlCharacterSetSchemaCollection charsets = provider.GetCharacterSets(); MySqlCollationSchemaCollection collations = provider.GetCollations(); foreach (MySqlCharacterSetSchema charset in charsets) { storeCharset.AppendValues(charset.Name, charset); } foreach (MySqlCollationSchema collation in collations) { storeCollation.AppendValues(collation.Name, collation); } }
public MySqlCollationSchemaCollection(MySqlCollationSchemaCollection collection) : base(collection, true) { }