dolt: Return a (cached) connection to the default Dolt database

View source: R/dolt.R

doltR Documentation

Return a (cached) connection to the default Dolt database

Description

dolt() returns a connection to a default database. It is a convenience wrapper around ⁠dbConnect(dolt_local/remote(), ...⁠ that also caches connections for faster loading.

Usage

dolt(
  dir = Sys.getenv("DOLT_DIR", "doltdb"),
  dbname = NULL,
  username = Sys.getenv("DOLT_USERNAME", "root"),
  password = Sys.getenv("DOLT_PASSWORD", ""),
  port = Sys.getenv("DOLT_PORT", 3306L),
  host = Sys.getenv("DOLT_HOST", "127.0.0.1"),
  cache_connection = TRUE,
  ...
)

Arguments

dir

The directory from which to server a dolt_local() connection. If "remote" a dolt_remote() connection will be made and no server will be started.

dbname

for remote connections, the database name

username

The username. Defaults to "root"

password

The login password. Defaults to empty.

port

The TCP port for connections. Defaults to 3306.

host

The IP of the host. Defaults to the local machine, ⁠127.0.0.1⁠

cache_connection

Should we preserve a cache of the connection? allows faster load times and prevents connection from being garbage-collected.

...

further arguments passed to dolt_server() or MariaDB()

See Also

Other connections: dolt_local(), dolt_remote()


ecohealthalliance/doltr documentation built on July 1, 2023, 11:38 a.m.