Package couchdbkit :: Module changes
[hide private]
[frames] | no frames]

Module changes

source code

module to fetch and stream changes from a database

Classes [hide private]
  ChangesStream
Change stream object.
Functions [hide private]
 
fold(db, fun, acc, since=0)
Fold each changes and accuumulate result using a function
source code
 
foreach(db, fun, since=0)
Iter each changes and pass it to the callable
source code
Variables [hide private]
  __package__ = 'couchdbkit'
Function Details [hide private]

fold(db, fun, acc, since=0)

source code 
Fold each changes and accuumulate result using a function

Args:

    @param db: Database, a database object
    @param fun: function, a callable with arity 2
    @param since: int, sequence where to start the feed

@return: list, last acc returned

Ex of function:

    fun(change_object,acc):
        return acc

If the function return "stop", the changes feed will stop.