Skip to content

Instantly share code, notes, and snippets.

@tony-kerz
Created March 12, 2017 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tony-kerz/0504ab537516f1ad762a0f7f8a756928 to your computer and use it in GitHub Desktop.
Save tony-kerz/0504ab537516f1ad762a0f7f8a756928 to your computer and use it in GitHub Desktop.
mongo formatted update result
{
  result: { n: 1, nModified: 1, ok: 1 },
  connection: {
    domain: null,
    _events: { error: [Object], close: [Object], timeout: [Object], parseError: [Object] },
    _eventsCount: 4,
    _maxListeners: undefined,
    options: {
      host: 'localhost',
      port: 27017,
      size: 25,
      connectionTimeout: 1800000,
      socketTimeout: 1800000,
      keepAlive: true,
      keepAliveInitialDelay: 0,
      noDelay: true,
      ssl: false,
      checkServerIdentity: true,
      ca: null,
      cert: null,
      key: null,
      passPhrase: null,
      rejectUnauthorized: false,
      promoteLongs: true,
      promoteValues: true,
      promoteBuffers: false,
      reconnect: true,
      reconnectInterval: 1000,
      reconnectTries: 30,
      domainsEnabled: false,
      disconnectHandler: [Object],
      cursorFactory: [Object],
      emitError: true,
      socketOptions: {},
      poolSize: 25,
      clientInfo: [Object],
      readPreference: [Object],
      promiseLibrary: [Function: Promise],
      bson: {}
    },
    id: 0,
    logger: { className: 'Connection' },
    bson: {},
    tag: undefined,
    messageHandler: [Function],
    maxBsonMessageSize: 67108864,
    port: 27017,
    host: 'localhost',
    keepAlive: true,
    keepAliveInitialDelay: 0,
    noDelay: true,
    connectionTimeout: 1800000,
    socketTimeout: 1800000,
    destroyed: false,
    domainSocket: false,
    singleBufferSerializtion: true,
    serializationFunction: 'toBinUnified',
    ca: null,
    cert: null,
    key: null,
    passphrase: null,
    ssl: false,
    rejectUnauthorized: false,
    checkServerIdentity: true,
    responseOptions: {
      promoteLongs: true,
      promoteValues: true,
      promoteBuffers: false
    },
    flushing: false,
    queue: [],
    connection: {
      connecting: false,
      _hadError: false,
      _handle: [Object],
      _parent: null,
      _host: 'localhost',
      _readableState: [Object],
      readable: true,
      domain: null,
      _events: [Object],
      _eventsCount: 8,
      _maxListeners: undefined,
      _writableState: [Object],
      writable: true,
      allowHalfOpen: false,
      destroyed: false,
      _bytesDispatched: 1739,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: null,
      _server: null,
      _idleTimeout: 1800000,
      _idleNext: [Object],
      _idlePrev: [Object],
      _idleStart: 1333,
      read: [Function],
      _consuming: true
    },
    writeStream: null,
    hashedName: '29bafad3b32b11dc7ce934204952515ea5984b3c',
    workItems: [],
    buffer: null,
    sizeOfMessage: 0,
    bytesRead: 0,
    stubBuffer: null
  },
  message: {
    parsed: true,
    index: 75,
    raw: 'foo',
    data: 'bar',
    bson: {},
    opts: {
      promoteLongs: true,
      promoteValues: true,
      promoteBuffers: false
    },
    length: 75,
    requestId: 20546,
    responseTo: 11,
    responseFlags: 8,
    cursorId: { _bsontype: 'Long', low_: 0, high_: 0 },
    startingFrom: 0,
    numberReturned: 1,
    documents: [ [Object] ],
    cursorNotFound: false,
    queryFailure: false,
    shardConfigStale: false,
    awaitCapable: true,
    promoteLongs: true,
    promoteValues: true,
    promoteBuffers: false,
    hashedName: '29bafad3b32b11dc7ce934204952515ea5984b3c'
  },
  modifiedCount: 1,
  upsertedId: null,
  upsertedCount: 0,
  matchedCount: 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment