Anonimongo

    Dark Mode
Search:
Group by:

Mongodb driver implemented in pure Nim. This library support mainly support for Mongo version >= 3.4 although some version fewer than that somehow supported.

The library currently is consisted by two main path functionalities.

1. Low level Mongo operations which in turn consisted of two main APIs:

  1. Modules core functionalities. (auth, bson, pool, types, utils, wire).
  2. Modules dbops functionalities. (aggregation, admmgmt, client, crud, diagnostic, freemonitoring, rolemgmt).

2. Higher level which represented as collections module.

Any casual user would only have to deal with collections module mainly without dabbling into lower level operations. Lower level APIs only used when user wants to implement any other commmands operations to add feature support.

collections module has read and write operations in there. Various CRUD APIs are implemented and more will be added after some extensive testings.

The Mongo object has field of Pool which handle any asynchronous queries which default to 64 per Mongo instance.

bson module is by default accessible from anonimongo module lib itself, but in case user only wants to use the BsonDocument itself for data exchange, the user would able to access it with import anonimongo/core/bson to avoid importing other anonimongo modules. Several examples for its APIs can be found in that page too.

Elaborate examples can be found in tests folder in the Github repo for references on how to do something. The specific examples would also be available in readme.md examples from the repo so user can refer that often to check any additional snippet example codes.

As usual, all of APIs index can be found in that page.

Exports

atEnd, ofInt, peekInt32, Writable, ==, toBson, toBson, mpairs, BsonInt32, BsonString, ofTimestamp, write, isNil, bkNull, BsonNull, decode, bkUndefined, bson, toBson, stMd5, ==, contains, stGeneric, add, pairs, readAll, bytes, bsonArray, len, bsonKey, BsonSubtype, toBson, as, bsonJs, stBinaryOld, bkInt32, MainStream, BsonBase, [], anonimongo/core/streamable, readInt64, BsonArray, DefaultStream, bkArray, toBson, BsonFetchError, anonimongo/core/macroto_v2, mget, stUuidOld, toBson, bkDbPointer, []=, bkString, peekStr, ofEmbedded, ofBinary, bkRegex, bkTime, newStream, peekInt8, ofBool, BsonObjectId, stFunction, bytes, BsonBool, writeLE, [], ofInt64, bkMinKey, readStr, [], bkDecimal, setPosition, write, BsonKind, bkBinary, newBson, bkDouble, write, getPosition, toBson, anonimongo/core/bsonify, $, bsonNull, ms, [], bsonBinary, del, ofString, ofObjectId, isNil, bkEmbed, BsonEmbed, anonimongo/core/bson, bkJs, bkEmptyArray, toBson, Readable, BsonJs, bson, ofInt32, peekChar, readInt32, bkObjectId, BsonDocument, newBson, stringbytes, contains, len, $, BsonDouble, bkJsScope, toBson, bkTimestamp, readUint8, readUint32, to, readChar, mget, readIntLE, stUuid, readInt8, toBson, bkBool, mget, Peekable, BsonInt64, Streamable, bsonExport, readFloat64, read, BsonTime, toBson, BsonBinary, bkMaxKey, toBson, bsonBinary, []=, len, bkSymbol, keys, add, ofTime, bkInt64, encode, ofArray, ofDouble, peekInt32LE, BsonTimestamp, ckWrite, username, MongoUri, verbose, mainPreferred, tailableCursor, Cursor, WriteResult, Query, SslInfo, noSlave, CommandKind, newMongo, cafile, collname, wkMany, [], slaveOk, close, [], authenticate, verifypeer, anonimongo/core/types, newMongo, tls, poolconn, Mongo, authenticated, hasUserAuth, authenticated, noTailable, secondaryPreferred, BulkResult, appname, Collection, MongoConn, host, initQuery, port, main, dbname, wkSingle, Database, MongoError, GridFS, secondary, newMongo, isTailable, ckRead, authenticate, WriteKind, appname=, ReadPreference, initSslInfo, flags, MultiUri, query, opUpdate, code, opCompressed, opCommand, opCommandReply, QueryFlags, CompressorId, getReply, ReplyFormat, MsgHeader, opKillCursors, opMsg, opGetMore, opDelete, prepare, prepareQuery, anonimongo/core/wire, OpCode, ResponseFlags, errmsg, cidNoop, opReply, opInsert, cidZstd, replyParse, opQuery, Flags, check, cidSnappy, RFlags, cidZlib, ok, opReserved, look, dropCollection, listDatabases, currentOp, listDatabaseNames, create, killOp, getDefaultReadConcern, listCollections, setDefaultRWConcern, renameCollection, dropIndexes, listCollectionNames, killCursors, dropDatabase, shutdown, createIndexes, listIndexes, anonimongo/dbops/admmgmt, usersInfo, revokeRolesFromUser, anonimongoVersion, createUser, updateUser, grantRolesToUser, connect, dropAllUsersFromDatabase, anonimongo/dbops/client, dropUser, anonimongo/dbops/crud, insert, delete, getMore, update, getLastError, findAndModify, find, grantRolesToRole, rolesInfo, dropRole, anonimongo/dbops/rolemgmt, updateRole, revokePrivilegesFromRole, revokeRolesFromRole, createRole, dropAllRolesFromDatabase, grantPrivilegesToRole, invalidateUserCache, anonimongo/dbops/aggregation, distinct, count, mapReduce, aggregate, geoSearch, explain, connectionStatus, hostInfo, shardConnPoolStats, dbHash, serverStat, validate, getCmdLineOpts, getLogFilters, top, getLog, dbStats, anonimongo/dbops/diagnostic, connPoolStats, collStats, ping, profile, dataSize, buildInfo, listCommands, setFreeMonitoring, enableFreeMonitoring, getFreeMonitoringStatus, disableFreeMonitoring, anonimongo/dbops/freemonitoring, replSetSyncFrom, replSetResizeOplog, replSetInitiate, replSetFreeze, anonimongo/dbops/replication, replSetReconfig, replSetGetStatus, replSetGetConfig, replSetMaintenance, isMaster, replSetStepDown, replSetAbortPrimaryCatchUp, csDrop, ChangeStreamId, csDropDatabase, csInvalidate, Namespace, csReplace, ChangeStream, csInsert, watch, ChangeStreamEvent, csUpdate, csDelete, DocumentKey, csRename, forEach, anonimongo/changestreams, distinct, findIter, aggregate, findAndModify, items, iter, findOne, update, one, dropIndex, createIndex, drop, remove, insert, count, remove, dropIndexes, listIndexes, anonimongo/collections, findAll, remove, all, bulkWrite, pairs, find, metadata, listFileNames, availableFiles, megabytes, removeFile, kilobytes, read, fileSize, setPosition, downloadFile, getPosition, createBucket, readAll, drop, uploadFile, createBucket, anonimongo/gridfs, getStream, close, getBucket, downloadFile, downloadAs, uploadFile, getBucket, GridStream