vibe.db.mongo.connection
Low level mongodb protocol.
Copyright
Types 19
string messageint codeint connectionIdint ndouble okD POD representation of Mongo error object.
For successful queries "code" is negative. Can be used also to check how many documents where updated upon a successful query via "n" field.
Root class for vibe.d Mongo driver exception hierarchy.
this(string message, string file = __FILE__, size_t line = __LINE__, Throwable next = null)Generic class for all exception related to unhandled driver problems.
I.e.: protocol mismatch or unexpected mongo service behavior.
this(string message, string file = __FILE__, size_t line = __LINE__, Throwable next = null)Wrapper class for all inner mongo collection manipulation errors.
It does not indicate problem with vibe.d driver itself. Most frequently this one is thrown when MongoConnection is in checked mode and getLastError() has something interesting.
MongoErrorDescription descriptionthis(MongoErrorDescription description, string file = __FILE__,
size_t line = __LINE__, Throwable next = null)Generic class for all exceptions related to authentication problems.
I.e.: unsupported mechanisms or wrong credentials.
this(string message, string file = __FILE__, size_t line = __LINE__, Throwable next = null)[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.
MongoClientSettings m_settingsTCPConnection m_connInterfaceProxy!Stream m_streamulong m_bytesReadint m_msgidStreamOutputRange!(InterfaceProxy!Stream) m_outRangeServerDescription m_descriptionbool m_allowReconnectFlag to prevent recursive connections when server closes connection while connectingbool m_isAuthenticatingbool m_supportsOpMsgushort defaultPortvoid connect()void disconnect()void update(string collection_name, UpdateFlags flags, Bson selector, Bson update)void insert(string collection_name, InsertFlags flags, Bson[] documents)void query(T)(string collection_name, QueryFlags flags, int nskip, int nret, Bson query, Bson returnFieldSelector, scope ReplyDelegate on_msg, scope DocDelegate!T on_doc)Bson runCommand(T, CommandFailException = MongoDriverException)(
string database,
Bson command,
string errorInfo = __FUNCTION__,
string errorFile = __FILE__,
size_t errorLine = __LINE__
)Runs the given Bson command (Bson object with the first entry in the map being the command name) on the given database.Bson runCommandUnchecked(T, CommandFailException = MongoDriverException)(
string database,
Bson command,
string errorInfo = __FUNCTION__,
string errorFile = __FILE__,
size_t errorLine = __LINE__
)Bson runCommandImpl(T, CommandFailException)(
string database,
Bson command,
bool testOk = true,
string errorInfo = __FUNCTION__,
string errorFile = __FILE__,
size_t errorLine = __LINE__
)void startFind(T)(Bson command,
scope GetMoreHeaderDelegate on_header,
scope GetMoreDocumentDelegate!T on_doc,
string batchKey = "firstBatch",
string errorInfo = __FUNCTION__, string errorFile = __FILE__, size_t errorLine = __LINE__)Forwards the `find` command passed in to the database, handles the callbacks like with getMore. This exists for easier integration with MongoCursor!T.void delete_(string collection_name, DeleteFlags flags, Bson selector)void killCursors(scope long[] cursors)void killCursors(string collection, scope long[] cursors)MongoErrorDescription getLastError(string db)auto listDatabases()Queries the server for all databases.int recvMsg(bool dupBson = true)(int reqid,
scope MsgReplyDelegate!dupBson on_sec0,
scope MsgSection1StartDelegate on_sec1_start,
scope MsgSection1Delegate!dupBson on_sec1_doc)int recvReply(T)(int reqid, scope ReplyDelegate on_msg, scope DocDelegate!T on_doc)int sendMsg(int response_to, uint flagBits, Bson document)void sendValue(T)(scope T value)void sendBytes(scope const(ubyte)[] data){T recvInteger(T)()void recv(scope ubyte[] dst)const(char)[] recvCString()int nextMessageId()void checkForError(string collection_name)void certAuthenticate()void authenticate()void scramAuthenticate()this(string server, ushort port = defaultPort)Simplified constructor overload, with no m_settingsthis(MongoClientSettings cfg)getMore(T)string namedouble sizeOnDiskbool emptystring addressstring errorfloat roundTripTimeNullable!BsonDate lastWriteDateNullable!BsonObjectID opTimeServerType typeint minWireVersionstring mestring[] hostsstring[string] tagsstring setNameNullable!int setVersionNullable!BsonObjectID electionIdstring primarystring lastUpdateTimeNullable!int logicalSessionTimeoutMinutesServerTypeVariables 1
getHostArchitecture hostArchitecture