org.sqlite.SQLiteConfig.SynchronousMode Java Examples
The following examples show how to use
org.sqlite.SQLiteConfig.SynchronousMode.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TMDatabaseImpl.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
@Override public void start() throws SQLException, ClassNotFoundException { File file = new File(metaData.getDataPath()+File.separator+metaData.getDatabaseName()); if(!file.exists()){ throw new SQLException("File not found"); } SQLiteConfig conf = new SQLiteConfig(); conf.setSynchronous(SynchronousMode.OFF); String url = Utils.replaceParams(dbConfig.getDbURL(), metaData); url = url.replace("__FILE_SEPARATOR__", File.separator); String driver = dbConfig.getDriver(); Class.forName(driver); Properties prop = Utils.replaceParams(dbConfig.getConfigProperty(), metaData); SQLiteConfig config = new SQLiteConfig(prop); config.setSynchronous(SynchronousMode.OFF); conn = DriverManager.getConnection(url, config.toProperties()); // conn.setAutoCommit(false); }
Example #2
Source File: ScoreDatabaseAccessor.java From beatoraja with GNU General Public License v3.0 | 5 votes |
public ScoreDatabaseAccessor(String path) throws ClassNotFoundException { Class.forName("org.sqlite.JDBC"); SQLiteConfig conf = new SQLiteConfig(); conf.setSharedCache(true); conf.setSynchronous(SynchronousMode.OFF); // conf.setJournalMode(JournalMode.MEMORY); SQLiteDataSource ds = new SQLiteDataSource(conf); ds.setUrl("jdbc:sqlite:" + path); qr = new QueryRunner(ds); }
Example #3
Source File: SongInformationAccessor.java From beatoraja with GNU General Public License v3.0 | 5 votes |
public SongInformationAccessor(String filepath) throws ClassNotFoundException { Class.forName("org.sqlite.JDBC"); SQLiteConfig conf = new SQLiteConfig(); conf.setSharedCache(true); conf.setSynchronous(SynchronousMode.OFF); // conf.setJournalMode(JournalMode.MEMORY); ds = new SQLiteDataSource(conf); ds.setUrl("jdbc:sqlite:" + filepath); qr = new QueryRunner(ds); createTable(); }
Example #4
Source File: SQLiteSongDatabaseAccessor.java From beatoraja with GNU General Public License v3.0 | 5 votes |
public SQLiteSongDatabaseAccessor(String filepath, String[] bmsroot) throws ClassNotFoundException { Class.forName("org.sqlite.JDBC"); SQLiteConfig conf = new SQLiteConfig(); conf.setSharedCache(true); conf.setSynchronous(SynchronousMode.OFF); // conf.setJournalMode(JournalMode.MEMORY); ds = new SQLiteDataSource(conf); ds.setUrl("jdbc:sqlite:" + filepath); qr = new QueryRunner(ds); root = Paths.get("."); createTable(); }
Example #5
Source File: ScoreLogDatabaseAccessor.java From beatoraja with GNU General Public License v3.0 | 5 votes |
public ScoreLogDatabaseAccessor(String path) throws ClassNotFoundException { Class.forName("org.sqlite.JDBC"); SQLiteConfig conf = new SQLiteConfig(); conf.setSharedCache(true); conf.setSynchronous(SynchronousMode.OFF); // conf.setJournalMode(JournalMode.MEMORY); ds = new SQLiteDataSource(conf); ds.setUrl("jdbc:sqlite:" + path); qr = new QueryRunner(ds); createTable(); }
Example #6
Source File: TMDatabaseImpl.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
@Override public void start() throws SQLException, ClassNotFoundException { SQLiteConfig conf = new SQLiteConfig(); conf.setSynchronous(SynchronousMode.OFF); String url = Utils.replaceParams(dbConfig.getDbURL(), metaData); url = url.replace("__FILE_SEPARATOR__", File.separator); String driver = dbConfig.getDriver(); Class.forName(driver); Properties prop = Utils.replaceParams(dbConfig.getConfigProperty(), metaData); SQLiteConfig config = new SQLiteConfig(prop); config.setSynchronous(SynchronousMode.OFF); conn = DriverManager.getConnection(url, config.toProperties()); // conn.setAutoCommit(false); }