* if the connection fails or a pragma could not be set
*/
static SQLiteConnection openDB(String fileName, boolean readOnly) throws SQLiteException {
SQLiteConnection db = new SQLiteConnection(new File(fileName));
if (readOnly) {
db.openReadonly();
} else {
db.open(true);
}
// set 1GB cache_size:
final SQLiteStatement stmt = db.prepare("PRAGMA page_size;");