Commit e52d4a17 authored by Sachinda 's avatar Sachinda

last version

parent b9ee4ac0
CouchDB databse management CouchDB databse management
\ No newline at end of file
sample configuration file 'config.js'
\ No newline at end of file
module.exports = [{
"user_name": "prodsupp_root",
"password": "3a2riAMMA0b39ejBrKzHYr1Og8xOt9g8",
"service_url": "vg_prodsupp_couchdb",
"service_port": 5984,
"db_name": "hellow"
},
{
"user_name": "prodsupp_root",
"password": "3a2riAMMA0b39ejBrKzHYr1Og8xOt9g8",
"service_url": "vg_prodsupp_couchdb",
"service_port": 5984,
"db_name": "_users"
},
{
"user_name": "prodsupp_root",
"password": "3a2riAMMA0b39ejBrKzHYr1Og8xOt9g8",
"service_url": "vg_prodsupp_couchdb",
"service_port": 5984,
"db_name": "hello",
"view_document": {
"_id": "_design/viewModel_views",
"views": {
"activeStatusCount": {
"map": "function (doc) {\n if(typeof(doc.active_status) === 'boolean'){\n emit([doc.active_status], 1)\n }\n}",
"reduce": "_count"
}
},
"updates": {
"add_update": "function(doc, req){ var reqb = JSON.parse(req.body); if (!doc){ return[ reqb, 'NEW DOC']; } else { reqb['_rev'] = doc['_rev']; return [reqb, 'UPDATE DOC'] }}"
},
"language": "javascript"
},
"index_document": {
"_id": "_design/indexes",
"language": "query",
"views": {
"position": {
"map": {
"fields": {
"position": "desc "
},
"partial_filter_selector": {}
},
"reduce": "_count",
"options": {
"def": {
"fields": ["position"]
}
}
}
}
},
"update_handler": {
"_id": "_design/handler",
"updates": {
"handler": "function(doc, req){ var reqb = JSON.parse(req.body); if (!doc){ var newDoc = { _id:req.uuid, type: reqb.type, origin_id: reqb.origin_id, locale: reqb.locale, values_translation: reqb.values_translation}; return[ newDoc, 'NEW DOC']; } else { return [reqb, 'UPDATE DOC'] } }"
},
"language": "javascript"
}
}
]
\ No newline at end of file
{ {
"name": "@coutch_db_create/coutch_db_create", "name": "@couch_db_create/couch_db_create",
"version": "1.0.0", "version": "1.0.0",
"description": "ls -l", "description": "ls -l",
"main": "index.js", "main": "index.js",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment