Connector to 'CouchDB'

Provides an interface to the 'NoSQL' database 'CouchDB' (< https://couchdb.apache.org/>). Methods are provided for managing databases within 'CouchDB', including creating/deleting/updating/transferring, and managing documents within databases. One can connect with a local 'CouchDB' instance, or a remote 'CouchDB' database such as 'IBM Cloudant'. Documents can be inserted directly from vectors, lists, data.frames, and 'JSON'. Targeted at 'CouchDB' v2 or greater.


sofa

CRANstatus Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. R-check codecov.io rstudio mirrordownloads

An easy interface to CouchDB from R

sofa docs: https://docs.ropensci.org/sofa/

CouchDB versions

sofa works with CouchDB v2 and v3. See the builds for checks on various CouchDB versions.

CouchDB Info

Connect to CouchDB

This may be starting it on your terminal/shell

couchdb

Or opening the CouchDB app on your machine, or running it in Docker. Whatever it is, start it up.

Install sofa

From CRAN

install.packages("sofa")

Development version from GitHub

remotes::install_github("ropensci/sofa")

library('sofa')

Cushions

Cushions? What? Since it’s couch we gotta use cushions somehow. cushions are a connection class containing all connection info to a CouchDB instance. See ?Cushion for help.

As an example, connecting to a remote CouchDB-compatible service:

z <- Cushion$new(
  host = "example.com",
  transport = 'https',
  port = NULL,
  user = 'foobar',
  pwd = 'things'
)

Break down of parameters:

  • host: the base url, without the transport (http/https)
  • path: context path that is appended to the end of the url
  • transport: http or https
  • port: The port to connect to. Default: 5984. For Cloudant, have to set to NULL
  • user: User name for the service.
  • pwd: Password for the service, if any.
  • headers: headers to pass in all requests

If you call Cushion$new() with no arguments you get a cushion set up for local use on your machine, with all defaults used.

x <- Cushion$new()

Ping the server

x$ping()

Nice, it’s working.

More

See the docs https://docs.ropensci.org/sofa/ for more.

Meta

  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for sofa in R doing citation(package = 'sofa')
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

ropensci_footer

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("sofa")

0.4.2 by Yaoxiang Li, 3 months ago


https://github.com/ropensci/sofa, https://docs.ropensci.org/sofa/


Report a bug at https://github.com/ropensci/sofa/issues


Browse source code at https://github.com/cran/sofa


Authors: Yaoxiang Li [aut, cre] , Eduard Szöcs [aut] , Scott Chamberlain [aut] (ORCID: , rOpenSci [fnd] (ROR: <https://ror.org/019jywm96>)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports crul, jsonlite, R6, mime

Suggests testthat, cli, knitr, rmarkdown


Suggested by nodbi.


See at CRAN