I am using postgres in production and have tables that have jsonb type columns. I am trying to test these queries using junits and an in-memory embedded database.
In the past, I have used H2 and HSQL for testing queries that run on MySql or Sybase. However, I am facing trouble using these for postgres as jsonb type is not supported by H2/HSQL.
Caused by: org.hsqldb.HsqlException: type not found or user lacks privilege: JSONB
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.ParserDQL.readTypeDefinition(Unknown Source)
at org.hsqldb.ParserTable.readColumnDefinitionOrNull(Unknown Source)
at org.hsqldb.ParserTable.readTableContentsSource(Unknown Source)
at org.hsqldb.ParserTable.compileCreateTableBody(Unknown Source)
at org.hsqldb.ParserTable.compileCreateTable(Unknown Source)
at org.hsqldb.ParserDDL.compileCreate(Unknown Source)
at org.hsqldb.ParserCommand.compilePart(Unknown Source)
at org.hsqldb.ParserCommand.compileStatements(Unknown Source)
at org.hsqldb.Session.executeDirectStatement(Unknown Source)
at org.hsqldb.Session.execute(Unknown Source)
... 18 more
Is there any alternate approach available or if there is any trick that I am missing that could make jsonb work with H2/HSQL?
Aucun commentaire:
Enregistrer un commentaire