2.1.1 • Published 7 years ago
@datafire/mongodb v2.1.1
@datafire/mongodb
Client library for MongoDB
Installation and Usage
npm install --save @datafire/mongodblet mongodb = require('@datafire/mongodb').create({
database: "",
url: ""
});
mongodb.findOne({
"collection": "",
"query": {}
}).then(data => {
console.log(data);
});Description
Interact with MongoDB
Actions
findOne
Find a single document in the database
mongodb.findOne({
"collection": "",
"query": {}
}, context)Input
- input
object- collection required
string - query required
object - projection
object
- collection required
Output
- output
object
find
Find multiple documents in the database
mongodb.find({
"collection": "",
"query": {}
}, context)Input
- input
object- collection required
string - query required
object - projection
object
- collection required
Output
- output
array- items
object
- items
insertOne
Insert a document into the database
mongodb.insertOne({
"collection": "",
"document": {}
}, context)Input
- input
object- collection required
string - document required
object
- collection required
Output
- output
object
insertMany
Insert multiple documents into the database
mongodb.insertMany({
"collection": "",
"documents": []
}, context)Input
- input
object- collection required
string - documents required
array- items
object
- items
- collection required
Output
- output
object
update
Update all matching documents in the database
mongodb.update({
"collection": "",
"query": {},
"update": {}
}, context)Input
- input
object- collection required
string - query required
object - update required
object
- collection required
Output
- output
object
remove
Remove all matching documents in the database
mongodb.remove({
"collection": "",
"query": {}
}, context)Input
- input
object- collection required
string - query required
object - justOne
boolean
- collection required
Output
- output
object
Definitions
This integration has no definitions