SqliteConn {biodb} | R Documentation |
SQLite connector class.
SQLite connector class.
This is the abstract connector class for all SQLite databases.
biodb::BiodbConnBase
-> biodb::BiodbConn
-> SqliteConn
new()
New instance initializer. Connector classes must not be instantiated directly. Instead, you must use the createConn() method of the factory class.
SqliteConn$new(...)
...
All parameters are passed to the super class initializer.
Nothing.
isSearchableByField()
Tests if a field can be used to search entries when using method searchForEntries().
SqliteConn$isSearchableByField(field)
field
The name of the field.
Returns TRUE if the database is searchable using the specified field, FALSE otherwise.
hasField()
Tests if a field is defined for this database instance.
SqliteConn$hasField(field)
field
A valid Biodb entry field name.
TRUE of the field is defined, FALSE otherwise.
getQuery()
Run a query using a biodb SQL object.
SqliteConn$getQuery(query)
query
A valid BiodbSqlQuery object.
The result returned by DBI::dbGetQuery() call.
clone()
The objects of this class are cloneable with this method.
SqliteConn$clone(deep = FALSE)
deep
Whether to make a deep clone.
Super class BiodbConn
and sub-classes
CompSqliteConn
, and MassSqliteConn
.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Get a connector that inherits from SqliteConn: chebi_file <- system.file("extdata", "chebi_extract.sqlite", package="biodb") conn <- mybiodb$getFactory()$createConn('comp.sqlite', url=chebi_file) # Get an entry e <- conn$getEntry('1018') # Terminate instance. mybiodb$terminate()