public override DatabaseSchema CreateDatabaseSchema(string name) { MySqlDatabaseSchema schema = new MySqlDatabaseSchema(this); schema.Name = name; return(schema); }
public void SetDatabaseOptions(MySqlDatabaseSchema schema) { TreeIter iterCharset; TreeIter iterCollation; if (comboCharset.GetActiveIter(out iterCharset) && comboCollation.GetActiveIter(out iterCollation)) { schema.CharacterSetName = ((MySqlCharacterSetSchema)storeCharset.GetValue(iterCharset, 1)).Name; schema.CollationName = ((MySqlCollationSchema)storeCollation.GetValue(iterCollation, 1)).Name; schema.Comment = ""; } }
public void SetDatabaseOptions (MySqlDatabaseSchema schema) { TreeIter iterCharset; TreeIter iterCollation; if (comboCharset.GetActiveIter (out iterCharset) && comboCollation.GetActiveIter (out iterCollation)) { schema.CharacterSetName = ((MySqlCharacterSetSchema)storeCharset.GetValue (iterCharset, 1)).Name; schema.CollationName = ((MySqlCollationSchema)storeCollation.GetValue (iterCollation, 1)).Name; schema.Comment = ""; } }
//http://dev.mysql.com/doc/refman/5.1/en/create-database.html public override void CreateDatabase(DatabaseSchema database) { MySqlDatabaseSchema schema = (MySqlDatabaseSchema)database; StringBuilder sql = new StringBuilder(); sql.AppendFormat("CREATE DATABASE {0} ", schema.Name); if (schema.CharacterSetName != string.Empty) { sql.AppendFormat("CHARACTER SET {0} ", schema.CharacterSetName); } if (schema.CollationName != string.Empty) { sql.AppendFormat("COLLATE {0}", schema.CollationName); } ExecuteNonQuery(sql.ToString()); }
public override DatabaseSchema CreateDatabaseSchema (string name) { MySqlDatabaseSchema schema = new MySqlDatabaseSchema (this); schema.Name = name; return schema; }
public MySqlDatabaseSchema (MySqlDatabaseSchema schema) : base (schema) { characterSetName = schema.characterSetName; collationName = schema.collationName; }
public MySqlDatabaseSchema(MySqlDatabaseSchema schema) : base(schema) { characterSetName = schema.characterSetName; collationName = schema.collationName; }