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

this
this(string server, ushort port)

Simplified constructor overload, with no m_settings

this
this(MongoClientSettings cfg)
Undocumented in source.

Members

Functions

connect
void connect()
Undocumented in source. Be warned that the author may not have intended to support it.
delete_
deprecated void delete_(string collection_name, DeleteFlags flags, Bson selector)
Undocumented in source. Be warned that the author may not have intended to support it.
disconnect
void disconnect()
Undocumented in source. Be warned that the author may not have intended to support it.
getLastError
MongoErrorDescription getLastError(string db)
Undocumented in source. Be warned that the author may not have intended to support it.
insert
deprecated void insert(string collection_name, InsertFlags flags, Bson[] documents)
Undocumented in source. Be warned that the author may not have intended to support it.
killCursors
deprecated void killCursors(long[] cursors)
Undocumented in source. Be warned that the author may not have intended to support it.
killCursors
void killCursors(string collection, long[] cursors)
Undocumented in source. Be warned that the author may not have intended to support it.
listDatabases
auto listDatabases()

Queries the server for all databases.

query
deprecated void query(string collection_name, QueryFlags flags, int nskip, int nret, Bson query, Bson returnFieldSelector, ReplyDelegate on_msg, DocDelegate!T on_doc)
Undocumented in source. Be warned that the author may not have intended to support it.
runCommand
Bson runCommand(string database, Bson command, string errorInfo, string errorFile, size_t errorLine)

Runs the given Bson command (Bson object with the first entry in the map being the command name) on the given database.

runCommandUnchecked
Bson runCommandUnchecked(string database, Bson command, string errorInfo, string errorFile, size_t errorLine)
Undocumented in source. Be warned that the author may not have intended to support it.
startFind
void startFind(Bson command, GetMoreHeaderDelegate on_header, GetMoreDocumentDelegate!T on_doc, string errorInfo, string errorFile, size_t errorLine)

Forwards the find command passed in to the database, handles the callbacks like with getMore. This exists for easier integration with MongoCursor!T.

update
deprecated void update(string collection_name, UpdateFlags flags, Bson selector, Bson update)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

connected
bool connected [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
description
const(ServerDescription) description [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Templates

getMore
template getMore(T)
Undocumented in source.

Variables

defaultPort
enum ushort defaultPort;
Undocumented in source.

Meta