title: H2 Database triggers
body: <p>generally, when you use H2 database you have to create custom class and implement method "fire" to write Trigger.</p>
  
  <p>For my project I am using batches for inserts. I need to use trigger to make a kind of complex data integrity check on the table I want to insert into, which is not possible using CHECK. So I have to make a select statement in the trigger method to make a check.</p>
  
  <p>Since there could be many inserts I would like to avoid many server roundtrips for each trigger select statement(that's why I am using batches for inserts). Does H2 database sends request to DB from "fire" method everytime if I make a select statement there or is this trigger method somehow integrated into database engine itself ?</p>
  
  <p>Thanks,
  Lubos</p>