Class MongoConnection [internal] Provides low-level mongodb protocol access.
It is not intended for direct usage. Please use vibe.db.mongo.db and vibe.db.mongo.collection modules for your code.
Note that a MongoConnection may only be used from one fiber/thread at a time.
Constructors
Name Description
this
(server, port)
Simplified constructor overload, with no m_settings
this
(cfg)
Methods
Name Description
connect
()
delete_
(collection_name, flags, selector)
disconnect
()
getLastError
(db)
getMore
(collection_name, nret, cursor_id, on_msg, on_doc)
getMore
(cursor_id, database, collection_name, nret, on_header, on_doc, timeout, errorInfo, errorFile, errorLine)
Modern (MongoDB 3.2+ compatible) getMore implementation using the getMore
command and OP_MSG. (if supported)
insert
(collection_name, flags, documents)
killCursors
(cursors)
killCursors
(collection, cursors)
listDatabases
()
Queries the server for all databases.
query
(collection_name, flags, nskip, nret, query, returnFieldSelector, on_msg, on_doc)
runCommand
(database, command, errorInfo, errorFile, errorLine)
Runs the given Bson command (Bson object with the first entry in the map
being the command name) on the given database.
runCommandUnchecked
(database, command, errorInfo, errorFile, errorLine)
update
(collection_name, flags, selector, update)
Authors
Sönke Ludwig
Copyright
© 2012-2016 Sönke Ludwig
License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.