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

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