| src_postgres | R Documentation |
Setup a PostgreSQL database connection
src_postgres(dbname = "test", host = "localhost", port = 5432L, ...)
dbname |
(character) name of database, has to exist to open a connection |
host |
(character) host of the database,
see |
port |
(integer) port of the database,
see |
... |
additional named parameters passed
on to |
Uses RPostgres as backend. nodbi creates or uses
a PostgreSQL table, with columns _id and json created and used
by package nodbi, applying SQL functions as per
https://www.postgresql.org/docs/current/functions-json.html
to the json column.
Each row in the table represents a JSON document.
Any root-level _id is extracted from the document(s) and used
for column _id, otherwise a UUID is created as _id.
The table is indexed on _id. A custom plpgsql function
is used for docdb_update().
The order of variables in data frames returned by docdb_get()
and docdb_query() can differ from their order the input to
docdb_create().
For a benchmark, see https://github.com/ropensci/nodbi#benchmark
A nodbi source object
## Not run:
con <- src_postgres()
print(con)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.