src/anonimongo/changestreams

Source   Edit  

Types

ChangeStream = object
  id* {.bsonKey: "_id".}: ChangeStreamId
  operationType*: ChangeStreamEvent
  fullDocument*: BsonDocument
  ns*: Namespace
  documentKey*: DocumentKey
Source   Edit  
ChangeStreamEvent = enum
  csInsert = "insert", csUpdate = "update", csReplace = "replace",
  csDelete = "delete", csInvalidate = "invalidate", csDrop = "drop",
  csDropDatabase = "dropDatabase", csRename = "rename"
Source   Edit  
ChangeStreamId = object
  data* {.bsonKey: "_data".}: string
Source   Edit  
DocumentKey = object
  id* {.bsonKey: "_id".}: Oid
Source   Edit  
Namespace = object
  db*: string
  coll*: string
Source   Edit  

Procs

proc forEach(c: Cursor[AsyncSocket]; cb: proc (b: ChangeStream);
             stopWhen: set[ChangeStreamEvent]): Future[void] {.
    ...stackTrace: false, raises: [Exception],
    tags: [RootEffect, TimeEffect, WriteIOEffect, ReadIOEffect], forbids: [].}
Source   Edit  
proc forEach(c: Cursor[Socket]; cb: proc (b: ChangeStream);
             stopWhen: set[ChangeStreamEvent]): void {.
    ...raises: [ValueError, Exception, KeyError, Exception],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
Source   Edit  
proc watch(coll: Collection[AsyncSocket]; pipelines: seq[BsonDocument] = @[];
           options = bson()): Future[Cursor[AsyncSocket]] {....stackTrace: false,
    raises: [Exception, ValueError],
    tags: [RootEffect, TimeEffect, WriteIOEffect, ReadIOEffect], forbids: [].}
Source   Edit  
proc watch(coll: Collection[Socket]; pipelines: seq[BsonDocument] = @[];
           options = bson()): Cursor[Socket] {....raises: [ValueError, Exception,
    KeyError, MongoError, IOError, OSError, SnappyError, ZippyError, SslError,
    TimeoutError], tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect],
    forbids: [].}
Source   Edit