mongodb
A writable stream that batches MongoDB inserts.
API
const Collector_MongoDB = const stream = streamcollection = <your mongodb collection> stream
var stream = Collector_MongoDB([options])
Create a writable stream. Options:
collection
- collection to write to. You can also set this asynchronously asstream.collection=collection
limit=1000
- maximum number of documents to insert at a timeinterval=1000
- minimum interval to insert
stream.write(doc)
Write an object to the collection.
stream.flush()
Force an insert into the collection.