Package 'filehashSQLite'

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

Help Index


Fetch Multiple Objects Operator

Description

Return (as a named list) the values associated with a vector of keys

Usage

## S4 method for signature 'filehashSQLite,character,ANY,ANY'
x[i, j, ..., drop = TRUE]

Arguments

x

object of class "filehashSQLite"

i

index

j

index

...

other arguments (not used)

drop

drop dimensions


Delete Object

Description

Delete an object from the database

Usage

## S4 method for signature 'filehashSQLite,character'
dbDelete(db, key, ...)

Arguments

db

object of class "filehashSQLite"

key

character vector of key names

...

other arguments (not used)


Disconnect from Database

Description

Disconnect from Database

Usage

## S4 method for signature 'filehashSQLite'
dbDisconnect(conn, ...)

Arguments

conn

database object

...

other arguments (not used)


Check Existence of Key

Description

Check to see if a key is in the database

Usage

## S4 method for signature 'filehashSQLite,character'
dbExists(db, key, ...)

Arguments

db

object of class "filehashSQLite"

key

character vector of key names

...

other arguments (not used)


Fetch Object

Description

Retrieve the value associated with a specific key

Usage

## S4 method for signature 'filehashSQLite,character'
dbFetch(db, key, ...)

Arguments

db

object of class "filehashSQLite"

key

character, key name

...

other arguments (not used)


Insert Object

Description

Insert a key-value pair into a database

Usage

## S4 method for signature 'filehashSQLite,character'
dbInsert(db, key, value, ...)

Arguments

db

object of class "filehashSQLite"

key

character, key name

value

R object

...

other arguments (not used)


List Keys

Description

Return a character vector of all keys in the database

Usage

## S4 method for signature 'filehashSQLite'
dbList(db, ...)

Arguments

db

object of class "filehashSQLite"

...

other arguments (not used)


Fetch Multiple Objects

Description

Return (as a named list) the values associated with a vector of keys

Usage

## S4 method for signature 'filehashSQLite,character'
dbMultiFetch(db, key, ...)

Arguments

db

object of class "filehashSQLite"

key

character vector of key names

...

other arguments (not used)


Filehash SQLite Class

Description

Filehash SQLite Class

Slots

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

Note

“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.