FAQ
Repository: couchdb-couch-mrview
Updated Branches:
   refs/heads/1994-merge-rcouch 63cbeecba -> 4e0f29577


API for triggering view updates


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/6c96010a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/6c96010a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/6c96010a

Branch: refs/heads/1994-merge-rcouch
Commit: 6c96010aa315a01db60666d0701c5108c56ca525
Parents: 63cbeec
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Fri Mar 8 16:24:04 2013 -0600
Committer: benoitc <bchesneau@gmail.com>
Committed: Tue Mar 4 10:38:15 2014 +0100

----------------------------------------------------------------------
  src/couch_mrview.erl | 11 +++++++++++
  1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/6c96010a/src/couch_mrview.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview.erl b/src/couch_mrview.erl
index a578b85..9f6b70d 100644
--- a/src/couch_mrview.erl
+++ b/src/couch_mrview.erl
@@ -19,6 +19,7 @@
  -export([get_info/2]).
  -export([get_view_info/3]).
  -export([refresh/2]).
+-export([trigger_update/2, trigger_update/3]).
  -export([compact/2, compact/3, cancel_compaction/2]).
  -export([cleanup/1]).

@@ -191,6 +192,16 @@ refresh(Db, DDoc) ->
              {error, Error}
      end.

+
+trigger_update(Db, DDoc) ->
+ trigger_update(Db, DDoc, couch_db:get_update_seq(Db)).
+
+
+trigger_update(Db, DDoc, UpdateSeq) ->
+ {ok, Pid} = couch_index_server:get_index(couch_mrview_index, Db, DDoc),
+ couch_index:trigger_update(Pid, UpdateSeq).
+
+
  compact(Db, DDoc) ->
      compact(Db, DDoc, []).

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 7 of 7 | next ›
Discussion Overview
groupcommits @
categoriescouchdb
postedJul 13, '14 at 12:29p
activeJul 13, '14 at 12:29p
posts7
users1
websitecouchdb.apache.org
irc#couchdb

1 user in discussion

Benoitc: 7 posts

People

Translate

site design / logo © 2021 Grokbase