Hi, El 25/11/10 17:51, Rami escribió: > The signature is fireConstraints(Session session, Row oldRow, Row newRow, > boolean before) > So if someone would like to move the constraint check to the end of > transaction > one would need to create some kind of changeset caused by the transaction. > > The simple way to do it would be > List<Row> oldRows, List<Row> newRows > that would simply be a list of rows that have been somehow affected by the > transaction. > These lists could be populated in the same place where the constraints are > now being checked. > Comments?
I hope it's as simple as it seems, but I'm afraid it won't be. Every insert, update and delete in the same transaction could cascade other updates and fire triggers doing what ever they want, and all that updates have the potential to queue more deferred constraints to check on many distinct tables. I imagine that to defer all constraint's check (those who are nowchecked before) it may be necessary to retain more information (or ab-use the transaction log) that a list of old and new row per table. Anyway I hope to be wrong. > Should I give this a shot? > Any step forward to deferred check implementation would be nice and useful even a partial one. regards, Dario. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
