コード例 #1
0
        public void SetDatabaseOptions(NpgsqlDatabaseSchema schema)
        {
            TreeIter iter;

            if (comboOwner.GetActiveIter(out iter))
            {
                schema.Owner = (UserSchema)ownersStore.GetValue(iter, 1);
            }
            else if (comboOwner.ActiveText != String.Empty)
            {
                Console.WriteLine("Elegido");
                UserSchema user = new UserSchema(schema.SchemaProvider);
                user.Name = comboOwner.ActiveText;
            }

            if (comboTemplate.GetActiveIter(out iter))
            {
                schema.Template = (DatabaseSchema)templatesStore.GetValue(iter, 1);
            }
            else if (comboTemplate.ActiveText != string.Empty)
            {
                DatabaseSchema db = new DatabaseSchema(schema.SchemaProvider);
                db.Name = comboTemplate.ActiveText;
            }

            if (comboEncoding.GetActiveIter(out iter))
            {
                schema.Encoding = (NpgsqlEncoding)encodingsStore.GetValue(iter, 1);
            }
            else if (comboEncoding.ActiveText != string.Empty)
            {
                NpgsqlEncoding enc = new  NpgsqlEncoding(schema.SchemaProvider);
                enc.Name = comboEncoding.ActiveText;
            }

            if (comboTablespace.GetActiveIter(out iter))
            {
                schema.Tablespace = (NpgsqlTablespace)tablespacesStore.GetValue(iter, 1);
            }
            else if (comboTablespace.ActiveText != string.Empty)
            {
                NpgsqlTablespace ts = new NpgsqlTablespace(schema.SchemaProvider);
                ts.Name = comboTablespace.ActiveText;
            }
        }
コード例 #2
0
		
		public override DatabaseSchema CreateDatabaseSchema (string name)
		{
			NpgsqlDatabaseSchema schema = new NpgsqlDatabaseSchema (this);
			schema.Name = name;
			
			return schema;
コード例 #3
0
		public void SetDatabaseOptions (NpgsqlDatabaseSchema schema)
		{
			TreeIter iter;
			
			if (comboOwner.GetActiveIter (out iter))
				schema.Owner = (UserSchema)ownersStore.GetValue (iter,1);
			else if (comboOwner.ActiveText != String.Empty) {
				Console.WriteLine ("Elegido");
				UserSchema user = new UserSchema (schema.SchemaProvider);
				user.Name = comboOwner.ActiveText;
			}
			
			if (comboTemplate.GetActiveIter (out iter))
				schema.Template = (DatabaseSchema)templatesStore.GetValue (iter,1);
			else if (comboTemplate.ActiveText != string.Empty) {
				DatabaseSchema db = new DatabaseSchema (schema.SchemaProvider);
				db.Name = comboTemplate.ActiveText;
			}
			
			if (comboEncoding.GetActiveIter (out iter))
				schema.Encoding = (NpgsqlEncoding)encodingsStore.GetValue (iter, 1);
			else if (comboEncoding.ActiveText != string.Empty) {
				NpgsqlEncoding enc = new  NpgsqlEncoding (schema.SchemaProvider);
				enc.Name = comboEncoding.ActiveText;
			}
			
			if (comboTablespace.GetActiveIter (out iter))
				schema.Tablespace = (NpgsqlTablespace)tablespacesStore.GetValue (iter, 1);
			else if (comboTablespace.ActiveText != string.Empty) {
				NpgsqlTablespace ts = new NpgsqlTablespace (schema.SchemaProvider);
				ts.Name = comboTablespace.ActiveText;
			}
		}