Anonimongo

Search:
Group by:
Source   Edit  

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 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.

Exports

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