Start up a dolt SQL server and return the server process handle

dolt_server(
  dir = Sys.getenv("DOLT_DIR", "doltdb"),
  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"),
  find_port = TRUE,
  find_server = TRUE,
  multi_db = FALSE,
  autocommit = TRUE,
  read_only = FALSE,
  log_level = "info",
  log_out = NULL,
  timeout = 0,
  query_parallelism = 2,
  max_connections = 100,
  config_file = Sys.getenv("DOLT_CONFIG_FILE", "")
)

Arguments

dir

The dolt directory to serve

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

find_port

if TRUE, switch to a different port if port is used by another process

find_server

if TRUE, find a server process serving the same directory rather than starting a new one. Note that other server options will be ignored. This allows the server to be used across R sessions. Note that to make best use of this you may want to turn off the "Quit child processes on exit" option in RStudio project options.

multi_db

Serve multiple databases? If TRUE, dir should be a directory with multiple subdirectories that are dolt databases

autocommit

Automatically commit database changes to the working set? If FALSE, anything not manually committed will be lost.

read_only

should the database only allow read_only connections?

log_level

Defines the level of logging provided. Options are "trace", debug", "info", "warning", "error", and "fatal" (default "info").

log_out

Where logging output should be directed. If "|" it is passed to std_out(), if NULL (default), it is suppressed. Can also take a filename. See processx::run().

timeout

Defines the timeout, in seconds, used for connections A value of 0 represents an infinite timeout (default 28800000)

query_parallelism

Set the number of go routines spawned to handle each query (default 2)

max_connections

Set the number of connections handled by the server (default 100)

config_file

The path to a YAML config file to set these and additional server configuration values. See options in the dolt documentation.

Value

A dolt_server object that is also a ps::ps_handle()