conn.prepareStatement("PRAGMA cache_size="+Math.ceil(kilobytes/1.5)+";").executeUpdate();
}
- public SqliteTable(String filename, String[] tables, String reapTable, String reapColumn) {
- this(filename, tables, false, reapTable, reapColumn);
+ public SqliteTable(String filename, String[] tables) {
+ this(filename, tables, false);
}
- public SqliteTable(String filename, String[] tables, boolean fastButDangerous,
- String reapTable, String reapColumn) {
+ public SqliteTable(String filename, String[] tables, boolean fastButDangerous) {
this.filename = filename;
try {
Class.forName("org.sqlite.JDBC");
}
catch (SQLException e) { throw new RuntimeException(e); }
catch (ClassNotFoundException e) { throw new RuntimeException(e); }
+ }
+
+ protected void reap(String reapTable, String reapColumn) {
+ if (this.reapTable != null || this.reapColumn != null)
+ throw new RuntimeException("reapTable/reapColumn already set");
this.reapTable = reapTable;
this.reapColumn = reapColumn;
if (reapTable != null && reapColumn != null)