Title: | Simple Key-Value Database Using SQLite |
---|---|
Description: | Simple key-value database using SQLite as the back end. |
Authors: | Roger D. Peng <[email protected]> |
Maintainer: | Roger D. Peng <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.2-6 |
Built: | 2025-02-21 03:28:54 UTC |
Source: | https://github.com/rdpeng/filehashsqlite |
Return (as a named list) the values associated with a vector of keys
## S4 method for signature 'filehashSQLite,character,ANY,ANY' x[i, j, ..., drop = TRUE]
## S4 method for signature 'filehashSQLite,character,ANY,ANY' x[i, j, ..., drop = TRUE]
x |
object of class "filehashSQLite" |
i |
index |
j |
index |
... |
other arguments (not used) |
drop |
drop dimensions |
Delete an object from the database
## S4 method for signature 'filehashSQLite,character' dbDelete(db, key, ...)
## S4 method for signature 'filehashSQLite,character' dbDelete(db, key, ...)
db |
object of class "filehashSQLite" |
key |
character vector of key names |
... |
other arguments (not used) |
Disconnect from Database
## S4 method for signature 'filehashSQLite' dbDisconnect(conn, ...)
## S4 method for signature 'filehashSQLite' dbDisconnect(conn, ...)
conn |
database object |
... |
other arguments (not used) |
Check to see if a key is in the database
## S4 method for signature 'filehashSQLite,character' dbExists(db, key, ...)
## S4 method for signature 'filehashSQLite,character' dbExists(db, key, ...)
db |
object of class "filehashSQLite" |
key |
character vector of key names |
... |
other arguments (not used) |
Retrieve the value associated with a specific key
## S4 method for signature 'filehashSQLite,character' dbFetch(db, key, ...)
## S4 method for signature 'filehashSQLite,character' dbFetch(db, key, ...)
db |
object of class "filehashSQLite" |
key |
character, key name |
... |
other arguments (not used) |
Insert a key-value pair into a database
## S4 method for signature 'filehashSQLite,character' dbInsert(db, key, value, ...)
## S4 method for signature 'filehashSQLite,character' dbInsert(db, key, value, ...)
db |
object of class "filehashSQLite" |
key |
character, key name |
value |
R object |
... |
other arguments (not used) |
Return a character vector of all keys in the database
## S4 method for signature 'filehashSQLite' dbList(db, ...)
## S4 method for signature 'filehashSQLite' dbList(db, ...)
db |
object of class "filehashSQLite" |
... |
other arguments (not used) |
Return (as a named list) the values associated with a vector of keys
## S4 method for signature 'filehashSQLite,character' dbMultiFetch(db, key, ...)
## S4 method for signature 'filehashSQLite,character' dbMultiFetch(db, key, ...)
db |
object of class "filehashSQLite" |
key |
character vector of key names |
... |
other arguments (not used) |
Remove a database
## S4 method for signature 'filehashSQLite' dbUnlink(db, ...)
## S4 method for signature 'filehashSQLite' dbUnlink(db, ...)
db |
object of class "filehashSQLite" |
... |
other arguments (not used) |
Filehash SQLite Class
datafile
character, full path to the file in which the database should be stored
dbcon
Object of class “SQLiteConnection”, a SQLite connection
drv
‘SQLite’ driver
name
character, the name of the database
“filehashSQLite” databases have a "["
method that can be
used to extract multiple elements in an efficient manner. The return
value is a list with names equal to the keys passed to "["
.
If there are keys passed to "["
that do not exist in the
database, a warning is given.
The “SQLite” format for filehash
uses an ASCII
serialization of the data which could result in some rounding error
for floating point numbers.
Note that if you use keys that are numbers coerced to character vectors, then you may have trouble with them being coerced to numeric. The SQLite database will see these key values and automatically convert them to numbers.