SqliteConn: SQLite connector class.

SqliteConnR Documentation

SQLite connector class.

Description

SQLite connector class.

SQLite connector class.

Details

This is the abstract connector class for all SQLite databases.

Super classes

biodb::BiodbConnBase -> biodb::BiodbConn -> SqliteConn

Methods

Public methods

Inherited methods

Method new()

New instance initializer. Connector classes must not be instantiated directly. Instead, you must use the createConn() method of the factory class.

Usage
SqliteConn$new(...)
Arguments
...

All parameters are passed to the super class initializer.

Returns

Nothing.


Method hasField()

Tests if a field is defined for this database instance.

Usage
SqliteConn$hasField(field)
Arguments
field

A valid Biodb entry field name.

Returns

TRUE of the field is defined, FALSE otherwise.


Method getQuery()

Run a query using a biodb SQL object.

Usage
SqliteConn$getQuery(query)
Arguments
query

A valid BiodbSqlQuery object.

Returns

The result returned by DBI::dbGetQuery() call.


Method clone()

The objects of this class are cloneable with this method.

Usage
SqliteConn$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Super class BiodbConn and sub-classes CompSqliteConn, and MassSqliteConn.

Examples

# 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()


pkrog/biodb documentation built on Nov. 29, 2022, 4:24 a.m.