dbConnect,SQLiteDriver-method {RSQLite} | R Documentation |
Connect to/disconnect from a SQLite database.
## S4 method for signature 'SQLiteDriver' dbConnect(drv, dbname = "", loadable.extensions = TRUE, cache_size = NULL, synchronous = "off", flags = SQLITE_RWC, vfs = NULL) ## S4 method for signature 'SQLiteConnection' dbConnect(drv) ## S4 method for signature 'SQLiteConnection' dbDisconnect(conn)
drv,conn |
An objected generated by |
dbname |
The path to the database file. There are two special values:
|
loadable.extensions |
When |
cache_size |
Advanced option. A positive integer to change the maximum number of disk pages that SQLite holds in memory (SQLite's default is 2000 pages). See http://www.sqlite.org/pragma.html#pragma_cache_size for details. |
synchronous |
Advanced options. Possible values for |
flags |
|
vfs |
Select the SQLite3 OS interface. See
http://www.sqlite.org/vfs.html for details. Allowed values are
|
# Create temporary in-memory db tmp <- dbConnect(SQLite(), ":memory:") summary(tmp) dbDisconnect(tmp) # Create temporary on-disk db with bigger cache and safer synchronisation tmp <- dbConnect(SQLite(), "", cache_size = 5000, synchronous = "full") summary(tmp) dbDisconnect(tmp)