public TriggerInfo CloneTrigger(DatabaseInfo ownerDb = null) { var res = new TriggerInfo(ownerDb ?? OwnerDatabase); res.Assign(this); return(res); }
public TriggerInfo CloneTrigger(DatabaseInfo ownerDb = null) { var res = new TriggerInfo(ownerDb ?? OwnerDatabase); res.Assign(this); return res; }
public override void ChangeTriggerSchema(TriggerInfo obj, string newschema) { ChangeObjectSchema(obj, newschema); }
public TriggerInfo FindTrigger(TriggerInfo obj) { return(FindTrigger(obj.FullName)); }
public virtual void RenameTrigger(TriggerInfo obj, string newname) { throw new NotImplementedException(); }
public override void RenameTrigger(TriggerInfo obj, string newname) { RenameObject(obj, newname); }
public virtual void AlterTrigger(TriggerInfo obj) { WriteRaw(Regex.Replace(obj.CreateSql, @"create\s+trigger", "ALTER TRIGGER", RegexOptions.IgnoreCase)); EndCommand(); }
public virtual void ChangeTriggerSchema(TriggerInfo obj, string newschema) { throw new NotImplementedException(); }
public virtual void CreateTrigger(TriggerInfo obj) { WriteRaw(obj.CreateSql); EndCommand(); }
public virtual void DropTrigger(TriggerInfo obj, bool testIfExists) { PutCmd("^drop ^trigger %f", obj.FullName); }
public void RenameTrigger(TriggerInfo obj, string newname) { var oldObj = _database.FindTrigger(obj); if (oldObj != null) { oldObj.FullName = new NameWithSchema(oldObj.FullName.Schema, newname); } }
public void ChangeTriggerSchema(TriggerInfo obj, string newschema) { var oldObj = _database.FindTrigger(obj); if (oldObj != null) { oldObj.FullName = new NameWithSchema(newschema, oldObj.FullName.Name); } }
public void AlterTrigger(TriggerInfo obj) { var oldObj = _database.FindTrigger(obj); if (oldObj != null) { string gid = oldObj.GroupId; oldObj.Assign(obj); oldObj.GroupId = gid; } }
public void DropTrigger(TriggerInfo obj, bool testIfExists) { _database.Functions.RemoveAll(v => v.FullName == obj.FullName); }
public void CreateTrigger(TriggerInfo obj) { _database.Triggers.Add(obj.CloneTrigger(_database)); }