This is a helper function that adds a limit of the max db docs to a query. It is not great.
Arguments
- query
A MongoDB JSON-query as used in this package.
- conn
A connection object returned by
connect_idaifield().
Examples
if (FALSE) { # \dontrun{
conn <- connect_idaifield(project = "test", pwd = "hallo")
fields <- c("resource.category", "resource.identifier")
query <- paste0('{ "selector": { "$not": { "resource.id": "" } },
"fields": [', paste0('"', fields, '"', collapse = ", "), '] }')
add_limit_to_query(query, conn)
} # }