dolt_local()
creates a DoltLocalDriver
, which can generate
a DoltLocalConnection
. Unlike dolt_remote()
and DoltDriver
, local
connections are for dolt databases stored in directories on-disk, and take
a directory name as an argument. The local connection type starts and manages
a dolt SQL server in the background serving that directory,
connects to it and returns the connection. Parameters govern both the server
and connection
Local dolt connection objects contain additional slots including the
database path on-disk and an external pointer to the server process, and
these are returned via dbGetInfo
and displayed in the connection print
method. The dbDisconnect
method kills the background server if no other
processes are connected to it.
Multi-user or other, more complicated networking set-ups should
use dolt_server()
and dolt_remote()
directly.
dolt_local()
# S4 method for DoltLocalDriver
dbUnloadDriver(drv, ...)
# S4 method for DoltLocalDriver
show(object)
# S4 method for DoltLocalDriver
dbConnect(
drv,
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,
autocommit = TRUE,
server_args = list(),
...
)
# S4 method for DoltLocalConnection
dbGetInfo(dbObj, ...)
# S4 method for DoltLocalConnection
show(object)
# S4 method for DoltLocalConnection
dbDisconnect(conn, ...)
# S4 method for DoltLocalConnection
dbIsValid(dbObj, ...)
an object of class DoltLocalDriver
, created by dolt_local()
.
additional arguments to pass to RMariaDB
a connection object
The dolt directory to serve and connect to
The username. Defaults to "root"
The login password. Defaults to empty.
The TCP port for connections. Defaults to 3306.
The IP of the host. Defaults to the local machine, 127.0.0.1
whether to find an open port if the default is used by another process
whether to look for another server process serving the same directory before creating a new one
Whether to autocommit changes in the SQL sense. That is, to flush pending changes to disk and update the working set.
a list of additional arguments to pass to dolt_server()
the database connection
the database connection
Other connections:
dolt_remote()
,
dolt()