Package: mongo 0.9-5

mongo: Higher level interface to Mongo database

This is a wrapper for the jsonlite and mongolite packages which offers both an R6 object for managing the connection as well as some mechanisms for saving and restoring S4 objects to a Mongo database.

Authors:Russell Almond

mongo_0.9-5.tar.gz
mongo_0.9-5.zip(r-4.5)mongo_0.9-5.zip(r-4.4)mongo_0.9-5.zip(r-4.3)
mongo_0.9-5.tgz(r-4.4-any)mongo_0.9-5.tgz(r-4.3-any)
mongo_0.9-5.tar.gz(r-4.5-noble)mongo_0.9-5.tar.gz(r-4.4-noble)
mongo_0.9-5.tgz(r-4.4-emscripten)mongo_0.9-5.tgz(r-4.3-emscripten)
mongo.pdf |mongo.html
mongo/json (API)

# Install 'mongo' in R:
install.packages('mongo', repos = c('https://ralmond.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ralmond/mongo/issues

On CRAN:

4.26 score 3 packages 49 exports 10 dependencies

Last updated 6 months agofrom:12736deb3b. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 26 2024
R-4.5-winNOTEOct 26 2024
R-4.5-linuxNOTEOct 26 2024
R-4.4-winNOTEOct 26 2024
R-4.4-macNOTEOct 26 2024
R-4.3-winNOTEOct 26 2024
R-4.3-macNOTEOct 26 2024

Exports:as.jlistas.jsonbuildJQtermbuildJQuerybuildObjectcodeClassdecodeClassfake_mongogetManyRecsgetOneReciteratorload_examplem_idm_id<-makeDBurimdbAggregatemdbAvailablemdbCountmdbDisconnectmdbDistinctmdbDropmdbExportmdbFindmdbFindLmdbImportmdbIndexmdbInfomdbInsertmdbIteratemdbMapreducemdbRemovemdbRenamemdbReplacemdbRunmdbUpdatemdbUpsertMongoDBMongoRecparse.jlistparse.jsonparseDataparsePOSIXparseSimpleDatasaveRecshowCollectionsshowDatabasesunboxerunparseDataununboxer

Dependencies:askpassformatRfutile.loggerfutile.optionsjsonlitelambda.rmimemongoliteopensslsys

JSON for S4 Objects

Rendered fromSavingS4Objects.Rmdusingknitr::rmarkdownon Oct 26 2024.

Last update: 2023-05-19
Started: 2023-05-19

Readme and manuals

Help Manual

Help pageTopics
Higher level interface to Mongo databasemongo-package mongo
Converts S4 objects to JSON representation.as.jlist as.jlist,ANY,list-method as.jlist,MongoRec,list-method as.json as.json,ANY-method as.json,MongoRec-method
Build a single query function.buildJQterm
Transforms a query into JQuery JSON.buildJQuery
Adds/removes package information to class descriptionscodeClass decodeClass
A simulated 'MongoDB' object for testingfake_mongo fake_mongo-class mdbAggregate,fake_mongo-method mdbAvailable,fake_mongo-method mdbCount,fake_mongo-method mdbDisconnect,fake_mongo-method mdbDistinct,fake_mongo-method mdbDrop,fake_mongo-method mdbExport,fake_mongo-method mdbFind,fake_mongo-method mdbImport,fake_mongo-method mdbIndex,fake_mongo-method mdbInfo,fake_mongo-method mdbInsert,fake_mongo-method mdbIterate,fake_mongo-method mdbMapreduce,fake_mongo-method mdbRemove,fake_mongo-method mdbRename,fake_mongo-method mdbReplace,fake_mongo-method mdbRun,fake_mongo-method mdbUpdate,fake_mongo-method mdbUpsert,fake_mongo-method showCollections,fake_mongo-method showDatabases,fake_mongo-method
Fetches Messages from a Mongo databasgetManyRecs getOneRec
An object which iterates over a collectioniterator iterator-class
List representation of a document.jlist
Class which supports the mdbCRUD methods.CRUD JSONDB-class mdbCRUD
Load example Event classload_example
Accessor for the Mongo id element of a record.m_id m_id,MongoRec-method m_id<- m_id<-,MongoRec-method
Creates the URI needed to connect to a mongo database.makeDBuri
Execute Aggregration PipelinemdbAggregate mdbAggregate,mongo-method mdbAggregate,MongoDB-method
Is the collection available for writing.mdbAvailable mdbAvailable,mongo-method mdbAvailable,MongoDB-method
Counts the number of records matching Query.mdbCount mdbCount,mongo-method mdbCount,MongoDB-method
Disconnects connection to database.mdbDisconnect mdbDisconnect,mongo-method mdbDisconnect,MongoDB-method
Find the distinct values of a particular fieldmdbDistinct mdbDistinct,mongo-method mdbDistinct,MongoDB-method
Drops the database collectionmdbDrop mdbDrop,mongo-method mdbDrop,MongoDB-method
Exports/imports data from external JSON or BSON filemdbExport mdbExport,mongo-method mdbExport,MongoDB-method mdbImport mdbImport,mongo-method mdbImport,MongoDB-method
Finds records which match the query and returns as data framemdbFind mdbFind,mongo-method mdbFind,MongoDB-method
Build/remove an index for the collection.mdbIndex mdbIndex,mongo-method mdbIndex,MongoDB-method
Get Information about the collectionmdbInfo mdbInfo,mongo-method mdbInfo,MongoDB-method
Insert a new record into a collectionmdbInsert mdbInsert,mongo-method mdbInsert,MongoDB-method
Returns documents as lists (jlists) from the database.mdbFindL mdbFindL,JSONDB-method mdbIterate mdbIterate,mongo-method mdbIterate,MongoDB-method
Applies a summary operation to a collectionmdbMapreduce mdbMapreduce,mongo-method mdbMapreduce,MongoDB-method
Remove selected objects from collectionmdbRemove mdbRemove,mongo-method mdbRemove,MongoDB-method
Renames collection or moves it to a new databasemdbRename mdbRename,mongo-method mdbRename,MongoDB-method
Replace a document with a new documentmdbReplace mdbReplace,mongo-method mdbReplace,MongoDB-method mdbUpsert mdbUpsert,JSONDB-method
Runs a Mongo command on the collectionmdbRun mdbRun,mongo-method mdbRun,MongoDB-method
Modify document(s) in a collectionmdbUpdate mdbUpdate,mongo-method mdbUpdate,MongoDB-method
MongoDB - Reference class wrapping a connection to a Mongo database collection.MongoDB MongoDB-class
Class "MongoRec".MongoRec MongoRec-class
Construct an S4 object from a list of its slot values.buildObject parse.jlist parse.jlist,ANY,list-method parse.jlist,MongoRec,list-method parse.json
Prepare R data for storage or restore R data from jlist #' The 'parseData' function is a helper function for 'parse.jlist()' methods, and 'unparseData' for 'as.jlist()', which represents complex objects as JSON.parseData unparseData
Convert Mongo dates to POSIXparsePOSIX
parseSimpleDataparseSimpleData
Saves a MongoRec object to a Mongo databasesaveRec
Shows collections in the current database.showCollections showCollections,mongo-method showCollections,MongoDB-method showCollections,NULL-method
Lists DatabasesshowDatabases showDatabases,MongoDB-method showDatabases,NULL-method
Marks scalar objects to be preserved when converting to JSONunboxer ununboxer