Hello H2 group,

as the subject implies, I want to suggest a restore point feature for H2.

The main motivation I have for it is this: H2 is heavily used in 
integration tests in undoubtedly thousands of Java projects all over the 
planet. It would be great if it were possible to populate a database once 
(e.g. with Flyway or Liquibase), create a restore point, run a test that 
actually commits data (instead of just rolling back, which is kinda the 
default in many setups), and then restore to the point before the test. 
This way one could test commit behavior of an application without the need 
to recreate a database from scratch for different tests.

I've actually implemented this already as some sort of PoC. You can find 
the code (with tests) here: 
https://github.com/i-am-not-giving-my-name-to-a-machine/h2database/tree/feature/implement-restore-points

I'm curious to read your opinion about the feature and would like to know 
if it has any chance of making it into H2. If it has a chance, then I'm 
happy to create a pull request for the changes I've made and would 
appreciate any feedback on how I could improve the current implementation.
And don't worry if you think it's a bad idea and the changes won't make it 
into H2. It was still a good exercise.

Kind regards
Enno

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/h2-database/85ffafae-df7c-42a6-8254-5ac22f00c48en%40googlegroups.com.

Reply via email to