db_updates: Get information on database updates

Description Usage Arguments Details Value Examples

View source: R/db_updates.R

Description

Get information on database updates

Usage

1
2
db_updates(cushion, feed = "longpoll", timeout = 60, heartbeat = TRUE,
  as = "list", ...)

Arguments

cushion

A Cushion object. Required.

feed

(character) One of longpoll (default), continuous, or eventsource. See Details.

timeout

(integer) Number of seconds until CouchDB closes the connection. Default: 60.

heartbeat

(logical) Whether CouchDB will send a newline character on timeout. Default: TRUE

as

(character) One of list (default) or json

...

Curl args passed on to one of the HTTP verbs (e.g,. GET, POST, PUT, etc.)

Details

This may not be very appropriate for use in R, but who knows, so here it is.

Also, continuous and eventsource don't seem to work in R, unless I'm missing something.

Options for the feed parmeter:

  • longpoll: Closes the connection after the first event.

  • continuous: Send a line of JSON per event. Keeps the socket open until timeout.

  • eventsource: Like, continuous, but sends the events in EventSource format.

Value

JSON as a character string or a list (determined by the as parameter)

Examples

1
2
3
4
5
6
7
8
## Not run: 
(x <- Cushion$new())

db_updates(x)
db_updates(x, feed="continuous")
db_updates(x, feed="eventsource")

## End(Not run)

sofa documentation built on May 19, 2017, 1:45 p.m.

Search within the sofa package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.