0.0.5 • Published 9 years ago

errand-component-mongodb v0.0.5

Weekly downloads
3
License
-
Repository
github
Last release
9 years ago

#errand-component-mongodb

errand task for working with mongodb

errand-component-mongodb is an errand component that is used to work with mongodb.

##Usage:

Example of how to use errand-component-mongodb in errand task list follows.

{
  "tasks":
    [
      {
        "description": "task to insert a list into a collection",
        "task": "errand-component-mongodb",
        "parameters":
          {
            "config": "default.json",
            "method": "upsert",
            "database": "test",
            "collection": "test",
            "data": [{"foo": "bar"}],
            "find": ""
          }
      }
    ]
}

Where:

  • description describes task
  • task is the name of task
  • parameters.config filename of config file
  • parameters.method instruction for task, options:
  • parameters.database database to use
  • parameters.collection collection to use
  • parameters.method instruction for task, options:
  • parameters.find used with remove and upsert to match documents in collections
    • when find is used with upsert pass find field to match on
    • when find is used with remove pass find key/value pair to match on - use {} to match all
  • parameters.data contains list of items

##Config

Add/change following details in your config file.

{
  "errand": {
    "errand-component-mongodb": {
      "host": "localhost",
      "port": "27017"
    }
  }
}
0.0.5

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago