Is it possible to have virtual column in HSQLDB

2018-02-23 json hsqldb jsonpath

I am new to HSQLDB and I am not sure whether HSQLDB supports Virtual column and JSON Path. I am trying to make use of this database to run my Unit Testing.

We use Oracle as the actual database and the Oracle Table has one field which accepts JSON as CLOB. Using JSON Path feature in Oracle, we have created Virtual Columns that parse the JSON and create the virtual column. The Oracle Table schema is as follows:

CREATE TABLE "DUMMY_TABLE" 
   (    "ID" VARCHAR2(40 BYTE), 
    "JSON_CONTENTS" CLOB, 
    "VIRTUAL_COLUMN1" VARCHAR2(40 BYTE) GENERATED ALWAYS AS (JSON_VALUE("JSON_CONTENTS" FORMAT JSON , '$.Info1.Value1' RETURNING VARCHAR2(40) NULL ON ERROR)) VIRTUAL , 
    "VIRTUAL_COLUMN2" VARCHAR2(40 BYTE) GENERATED ALWAYS AS (JSON_VALUE("JSON_CONTENTS" FORMAT JSON , '$.Info2.Value2' RETURNING VARCHAR2(40) DEFAULT 'Value2' ON ERROR)) VIRTUAL
   )

Is it possible to mimc the same functionality in HSQLDB ?

Answers

The JSON path features are not supported by HSQLDB.

Related