query_funcs: Wrappers for sending queries and fetching results

Description Usage Arguments Details Value Examples

Description

These functions send a query to the given database, and are the access point for all gtox functions that query or update the gtox database.

Usage

1
2
3
4
5
gtoxQuery(query, db = getOption("TCPL_DB"),
drvr = getOption("TCPL_DRVR"))

gtoxSendQuery(query, db = getOption("TCPL_DB"),
drvr = getOption("TCPL_DRVR"))

Arguments

query

Character of length 1, the query string

db

Character of length 1, the name of the gtox database

drvr

Character of length 1, which database driver to use

Details

Currently, the gtox package only supports the "MySQL" and "SQLite" database drivers.

gtoxQuery returns a data.table object with the query results. gtoxSendQuery sends a query, but does not fetch any results, and returns 'TRUE' or the error message given by the database.

Value

None

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Perform query
gtoxSendQuery(paste0("SELECT * FROM assay_source"))


## Store the current config settings, so they can be reloaded at the end 
## of the examples
conf_store <- gtoxConfList()
gtoxConfDefault()

gtoxQuery("SELECT 'Hello World';")
gtoxQuery("SELECT * FROM assay;")

## Reset configuration
options(conf_store)

GladiaTOX documentation built on Nov. 15, 2020, 2:07 a.m.