collection: Collect table entries

Description Usage Arguments Value Examples

View source: R/main.R

Description

This collects entries from specific collection and assigns it to a reactive value.

Usage

1
2
collection(collection_name, connection, column_names = character(),
  post_process = I)

Arguments

collection_name

A name of collection.

connection

Connection object.

column_names

Names of specific columns.

post_process

Post process function called before query is run.

Value

Reactive value with connection, collection_name and collection

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# Set up a connection to DEFAULT_DB
cn <- connect()
tvs <- collection("tv_shows", cn)
# Take a look at gathered entries
isolate(tvs$collection)

# Using post_process you might use specific rethinkDB operations
# in rethinker query format before query is run (like filter, orderBy).
# E.g., to gather only tv shows with less than 100 episodes use:
tvs <- collection("tv_shows", cn,
            post_process = function(q) q$filter(function(x) x$bracket("episodes")$lt(100)))

## End(Not run)

Appsilon/shiny.collections documentation built on Nov. 20, 2019, 5:39 p.m.