I use ORMLite and SQLite in memory database for speed. After operation, I need to backup the in memory database to a file, but could's find a method to do that.
In another thread (Backup and restore sqlite from disk to memory in Java) shown a method with JDBC Connection, therefor my question can be narrowed down to: If I have had a ORMLite ConnectionSource object, how can I get a JDBC Connection object from it?
Thanks
(JdbcDatabaseConnection) getSharedConnectionSource().getReadWriteConnection().getInternalConnection().createStatement().executeUpdate("backup to data.db");; <p>however, restore doesn't work:jdbcDatabaseConnection = (JdbcDatabaseConnection) getSharedConnectionSource().getReadWriteConnection().getInternalConnection().createStatement().executeUpdate("restore from data.db");"jdbc:sqlite:file::memory:?cache=shared"solved it.