Example #1
0
        public TriggerInfo CloneTrigger(DatabaseInfo ownerDb = null)
        {
            var res = new TriggerInfo(ownerDb ?? OwnerDatabase);

            res.Assign(this);
            return(res);
        }
Example #2
0
 public TriggerInfo CloneTrigger(DatabaseInfo ownerDb = null)
 {
     var res = new TriggerInfo(ownerDb ?? OwnerDatabase);
     res.Assign(this);
     return res;
 }
Example #3
0
 public override void ChangeTriggerSchema(TriggerInfo obj, string newschema)
 {
     ChangeObjectSchema(obj, newschema);
 }
Example #4
0
 public TriggerInfo FindTrigger(TriggerInfo obj)
 {
     return(FindTrigger(obj.FullName));
 }
Example #5
0
 public virtual void RenameTrigger(TriggerInfo obj, string newname)
 {
     throw new NotImplementedException();
 }
Example #6
0
 public override void RenameTrigger(TriggerInfo obj, string newname)
 {
     RenameObject(obj, newname);
 }
Example #7
0
 public virtual void AlterTrigger(TriggerInfo obj)
 {
     WriteRaw(Regex.Replace(obj.CreateSql, @"create\s+trigger", "ALTER TRIGGER", RegexOptions.IgnoreCase));
     EndCommand();
 }
Example #8
0
 public virtual void ChangeTriggerSchema(TriggerInfo obj, string newschema)
 {
     throw new NotImplementedException();
 }
Example #9
0
 public virtual void CreateTrigger(TriggerInfo obj)
 {
     WriteRaw(obj.CreateSql);
     EndCommand();
 }
Example #10
0
 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));
 }