You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you provide an example of usage (for example by correcting the below)?
val db = DriverManager.getConnection("jdbc:sqlite:" + new File(filePath).toString).asInstanceOf[SQLiteConnection]
db.open(allowCreate=true)
try {
var st = db.prepare(sql="CREATE TABLE IF NOT EXISTS definitions(headword TEXT PRIMARY KEY, definitions TEXT NOT NULL) WITHOUT ROWID")
st.step()
} finally {
db.dispose()
}
The text was updated successfully, but these errors were encountered:
There no need to use a JDBC URL since JDBC is not used here.
Just provide a File instance directly.
val db = new SQLiteConnection(new File(filePath))
db.open(allowCreate=true)
// Custom PRAGMA definitions (optional)
//db.exec("PRAGMA temp_store=2;")
//db.exec("PRAGMA cache_size=-100000;") // around 100 Mo
//db.exec("PRAGMA mmap_size=2147418112;")
try {
db.exec("CREATE TABLE IF NOT EXISTS definitions(headword TEXT PRIMARY KEY, definitions TEXT NOT NULL) WITHOUT ROWID")
} finally {
db.dispose()
}
Could you provide an example of usage (for example by correcting the below)?
The text was updated successfully, but these errors were encountered: