Package 'orderly.db'

Title: Database Support for 'orderly2'
Description: Access databases from 'orderly2' while running reports. Includes the basic 'SQL' support originally included in 'orderly' for establishing connections and setting up data for use within a report.
Authors: Rich FitzJohn [aut, cre], Imperial College of Science, Technology and Medicine [cph]
Maintainer: Rich FitzJohn <[email protected]>
License: MIT + file LICENSE
Version: 0.1.3
Built: 2024-11-28 03:39:21 UTC
Source: https://github.com/mrc-ide/orderly.db

Help Index


Create connection to database

Description

Create a persistent connection object to the database

Usage

orderly_db_connection(database = NULL, instance = NULL)

Arguments

database

The name of the database. This can be omitted (or NULL) where you only have a single database, but must be specified if you have more than one database configured.

instance

The instance of the database (within a given database). This can be omitted (or NULL) where you have not used instances or where you have only one configured.

Value

The connection object


Extract data from a database

Description

Extract data from a database

Usage

orderly_db_query(query, database = NULL, instance = NULL, name = NULL)

Arguments

query

Query to evaluate

database

The name of the database. This can be omitted (or NULL) where you only have a single database, but must be specified if you have more than one database configured.

instance

The instance of the database (within a given database). This can be omitted (or NULL) where you have not used instances or where you have only one configured.

name

An optional name that you can use to look up this query in your metadata.

Value

The extracted data


Create temporary view

Description

Create temporary view

Usage

orderly_db_view(query, as, database = NULL, instance = NULL)

Arguments

query

Query to create view from

as

Name of the view in the database

database

The name of the database. This can be omitted (or NULL) where you only have a single database, but must be specified if you have more than one database configured.

instance

The instance of the database (within a given database). This can be omitted (or NULL) where you have not used instances or where you have only one configured.

Value

Undefined