couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chirayu shah <chill....@gmail.com>
Subject CouchDB _changes API query
Date Wed, 20 Oct 2010 12:31:23 GMT
Hi,

The output that we get with the _changes database API tells us which
document was changed and its revision information.
Is there a way to get the notification when a particular key of a document
is changed?

Basically is there a way to listen to a specific key of a document of a
database?

For eg: Suppose I have a database as "helloworld", which has 2 documents
"app1" and "app2" whose contents are as follows:

app1 :

{
   "_id": "app1",
   "_rev": "2-c1765690ce0ba5c4d51bd6e06f6d63e1",
   "name": "Hello",
   "title": "World"
}


app2:

{
   "_id": "1",
   "_rev": "2-95ca949e944d55bdb0dc79b8d8223f05",
   "a": 2,
   "b": 4
}


Now I want to listen to the key "name" of the document "app1" for changes.
So I should receive the notification when the value of "name" changes and
not if the value of "title" changes.

Is there a way to do this in CouchDB? If yes, then how?
Any help would be much appreciated.

Thanks,
Chirayu.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message