コード例 #1
0
        public override DatabaseSchema CreateDatabaseSchema(string name)
        {
            MySqlDatabaseSchema schema = new MySqlDatabaseSchema(this);

            schema.Name = name;
            return(schema);
        }
コード例 #2
0
        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          = "";
            }
        }
コード例 #3
0
		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 = "";
				
			}
		}
コード例 #4
0
        //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());
        }
コード例 #5
0
		public override DatabaseSchema CreateDatabaseSchema (string name)
		{
			MySqlDatabaseSchema schema = new MySqlDatabaseSchema (this);
			schema.Name = name;
			return schema;
		}
コード例 #6
0
		public MySqlDatabaseSchema (MySqlDatabaseSchema schema)
			: base (schema)
		{
			characterSetName = schema.characterSetName;
			collationName = schema.collationName;
		}
コード例 #7
0
 public MySqlDatabaseSchema(MySqlDatabaseSchema schema)
     : base(schema)
 {
     characterSetName = schema.characterSetName;
     collationName    = schema.collationName;
 }