public void RenameDomain(IDomainStructure domain, NameWithSchema newname) { DomainStructure dom = Structure.FindOrCreateDomain(domain); AddOperation(new AlterOperation_RenameDomain { OldObject = dom, NewName = newname }); }
public void CreateDomain(IDomainStructure domain) { DomainStructure dom = new DomainStructure(domain); AddOperation(new AlterOperation_CreateDomain { NewObject = dom }); }
public void DropDomain(IDomainStructure domain) { DomainStructure dom = Structure.FindOrCreateDomain(domain); AddOperation(new AlterOperation_DropDomain { OldObject = dom }); }
protected virtual void LoadDomain(DomainStructure domain, DataRow row) { domain.FullName = NewNameWithSchema(row.SafeString("DOMAIN_SCHEMA"), row.SafeString("DOMAIN_NAME")); domain.DataType = AnalyseType(new DataRowAdapter(row), m_conn, true); string def = row.SafeString("DOMAIN_DEFAULT"); domain.DefaultValue = SqlExpression.ParseDefaultValue(GetDefaultValueExpression(def), m_dialect); }
public void ChangeDomain(IDomainStructure domain, IDomainStructure newdomain) { DomainStructure dom = Structure.FindOrCreateDomain(domain); DomainStructure newdom = new DomainStructure(newdomain); AddOperation(new AlterOperation_ChangeDomain { OldObject = dom, NewObject = newdom }); }
public void AddDomain(IDomainStructure domain, bool reuseGroupId) { var newdom = new DomainStructure(domain); if (!reuseGroupId) { newdom.GroupId = Guid.NewGuid().ToString(); } Domains.Add(newdom); }
//public IDatabaseSource TargetDb { get { return null; } } public DomainStructure FindOrCreateDomain(IDomainStructure domain) { DomainStructure res = FindDomain(domain.FullName); if (res != null) { return(res); } res = new DomainStructure(domain); Domains.Add(res); return(res); }
protected virtual void LoadDomains() { if ((m_members.DomainDetails || m_members.DomainList) && m_dialect.DialectCaps.Domains) { //m_db.Domains = new DomainCollection(); foreach (DataRow row in CachedQueryRows("SELECT * FROM INFORMATION_SCHEMA.DOMAINS")) { var dom = new DomainStructure(); LoadDomain(dom, row); m_db.Domains.Add(dom); } } }
public void Init(IDomainStructure domain, ISqlDialect dialect) { m_oldDomain = domain; if (domain == null) { m_domain = new DomainStructure(); m_domain.DataType = new DbTypeString(); } else { m_domain = new DomainStructure(domain); } m_dialect = dialect; cbxDataType.Items.Clear(); foreach (string code in Enum.GetNames(m_dialect.SpecificTypeEnum).Sorted()) { cbxDataType.Items.Add(code); } m_dataType = m_dialect.GenericTypeToSpecific(m_domain.DataType); propertyGrid1.SelectedObject = m_dataType; cbxDataType.SelectedIndex = cbxDataType.Items.IndexOf(((ISpecificType)m_dataType).Code.ToString()); chbNullable.Checked = m_domain.IsNullable; }