We are currently using the PostgreSQL and OrmLite database. Now we have a use case for using Postgres hstore , but cannot find a way to access this table through OrmLite. I would prefer not to open a separate database connection to select and paste into this single table, but I do not see any other parameters.
At least I need a handle to an existing connection that uses OrmLite, so I can reuse it to create a prepared statement, but I have not found a way to get java.sql.Connection , starting with OrmLite ConnectionSource . I see that OrmLite has a JdbcCompiledStatement , but this is just a wrapper around the PreparedStatement and requires that the PreparedStatement be passed to the constructor. (Not sure if this will be for use.)
I tried to use DatabaseConnection.compileStatement(...) , but it requires knowledge of the types of fields used, and OrmLite does not seem to know what hstore is.
I tried using updateRaw() , but this function exists only on dao OrmLite, which I do not have, because the table to which I attached dao has an OrmLite field type that it does not recognize. Is there a way to get a generic dao for issuing raw requests?
I understand that hstores are database specific and probably will not be supported by OrmLite, but I would really like to find a way to transfer data to and from the database using unsupported fields instead of just unsupported queries.
source share