lib/lhm/entangler.rb in lhm-1.0.0.rc6 vs lib/lhm/entangler.rb in lhm-1.0.0.rc7
- old
+ new
@@ -38,28 +38,28 @@
def create_insert_trigger
strip %Q{
create trigger `#{ trigger(:ins) }`
after insert on `#{ @origin.name }` for each row
- replace into `#{ @destination.name }` (#{ @common.joined })
+ replace into `#{ @destination.name }` (#{ @common.joined }) #{ SqlHelper.annotation }
values (#{ @common.typed("NEW") })
}
end
def create_update_trigger
strip %Q{
create trigger `#{ trigger(:upd) }`
after update on `#{ @origin.name }` for each row
- replace into `#{ @destination.name }` (#{ @common.joined })
+ replace into `#{ @destination.name }` (#{ @common.joined }) #{ SqlHelper.annotation }
values (#{ @common.typed("NEW") })
}
end
def create_delete_trigger
strip %Q{
create trigger `#{ trigger(:del) }`
after delete on `#{ @origin.name }` for each row
- delete ignore from `#{ @destination.name }`
+ delete ignore from `#{ @destination.name }` #{ SqlHelper.annotation }
where `#{ @destination.name }`.`id` = OLD.`id`
}
end
def trigger(type)