idf_json_query | R Documentation |
This function can be used to gather docs from an iDAI.field / Field Desktop Database using a JSON-Query as detailed by the CouchDB-API Docs.
idf_json_query(connection, query, projectname = NULL)
connection |
A connection object as returned
by |
query |
A valid JSON-query as detailed in the relevant section of the CouchDB-API documentation. |
projectname |
(deprecated) The name of the project to be queried (overrides the one listed in the connection-object). |
An idaifield_docs
list
Learn how to build the selector-query with the CouchDB-API.
Alternative functions: idf_query()
, idf_index_query()
## Not run:
conn <- connect_idaifield(pwd = "hallo", project = "rtest")
# Get all documents that contain "Anna Allgemeinperson" as processor
query <- '{ "selector": { "resource.processor": ["Anna Allgemeinperson"] } }'
result <- idf_json_query(conn, query = query)
# Get all documents where hasRestoration is TRUE
query <- '{ "selector": { "resource.hasRestoration": true } }'
result <- idf_json_query(conn, query = query)
# Get all documents where hasRestoration is TRUE
# but only the fields *identifier* and *hasRestoration*
query <- '{ "selector": { "resource.hasRestoration": true },
"fields": [ "resource.identifier", "resource.hasRestoration" ] }'
result <- idf_json_query(conn, query = query)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.