| RegLogMongoConnector {shiny.reglog} | R Documentation |
Connector to MongoDB database
Description
Object of this class handles all connections for the RegLogServer object to the database. It is created to handle MongoDB database compatible drivers. Provides methods than will be used by RegLogServer to get and send data.
Requires mongolite package to be installed.
Super class
shiny.reglog::RegLogConnector -> RegLogMongoConnector
Methods
Public methods
Inherited methods
Method new()
Initialization of the object
Usage
RegLogMongoConnector$new(
mongo_url,
mongo_db,
mongo_options = mongolite::ssl_options(),
collections = c("account", "reset_code", "logs"),
custom_handlers = NULL
)Arguments
mongo_urlURI to the MongoDB cluster
mongo_dbname of the MongoDB database
mongo_optionsadditional connection options such as SSL keys/certs
collectionsnames of the collections
custom_handlersnamed list of custom handler functions. Every custom handler should take arguments:
selfandprivate- relating to the R6 object andmessageof classRegLogConnectorMessage. It should returnRegLogConnectorMessageobject.table_namescharacter vector. Contains names of the collections in the database: first containing user data, second - reset codes information, third (optional) - logs from the object. For more info check documentation of
mongo_database_create.
Returns
Object of RegLogMongoConnector class
Method clone()
The objects of this class are cloneable with this method.
Usage
RegLogMongoConnector$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.