I want to unit test In Java Spring-boot Postgres native query for jsonb datatype without hitting the actual DB.Instead using some embedded database or other approach ,but embedded databases like H2 doesn't support Postgres jsonb specific operators like ->>
, #>>
etc.
Is there a way that I can to this? Please also suggest any other approach for the same.
Query Example:
@Query(value = "SELECT * FROM table WHERE column ->> 'Id'=?1", nativeQuery = true)
public Entity fertchById(String id);