I'm working on a project where we use Apache Phoenix library for HBase access. In that implementation operations like "Insert" or "Update" don't exist, but a "Upsert" is present instead. It updates data, if it is present in DB, or inserts, if such record wasn't found. Because of this I can't use dbunit to prepare my test DB, since dbunit doesn't support it.
dbUnit uses SQL over JDBC so it supports SQL/traditional databases. Someone would have to implement support for NoSQL or you would use an existing adapter/product from JDBC to NoSQL.
Potentially, the dbUnit DatabaseOperation helps you for refreshing data if you find an approach.
For implementing custom upsert operation it would be nice to inherit it from "InsertOperation", because the SQL is build in same way, as for Insert just with replacing of "insert" with "upsert" in SQL. But because "InsertOperation" class's constructor is package-private I can't inherit from it.
Could it be made public? Should I create a pull request for this?
Or, maybe, I can contribute a complete UpsertOperation class.
It's great you have knowledge and setup to solve. Yes, please create a merge request of a solution with tests - unit tests for general logic and DB integration tests to prove it works with a DB (we'll want to make new Docker setups for each DB to test the Upsert with). Please also refer to Developer's Guide
Ok, thank you :)