View source: R/dolt-local-connection.R
dolt_local | R Documentation |
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 signature 'DoltLocalDriver'
dbUnloadDriver(drv, ...)
## S4 method for signature 'DoltLocalDriver'
show(object)
## S4 method for signature '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 signature 'DoltLocalConnection'
dbGetInfo(dbObj, ...)
## S4 method for signature 'DoltLocalConnection'
show(object)
## S4 method for signature 'DoltLocalConnection'
dbDisconnect(conn, ...)
## S4 method for signature 'DoltLocalConnection'
dbIsValid(dbObj, ...)
drv |
an object of class |
... |
additional arguments to pass to |
object |
a connection object |
dir |
The dolt directory to serve and connect to |
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, |
find_port |
whether to find an open port if the default is used by another process |
find_server |
whether to look for another server process serving the same directory before creating a new one |
autocommit |
Whether to autocommit changes in the SQL sense. That is, to flush pending changes to disk and update the working set. |
server_args |
a list of additional arguments to pass to |
dbObj |
the database connection |
conn |
the database connection |
Other connections:
dolt_remote()
,
dolt()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.