summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-04-16 18:49:35 -0300
committerdrebs <drebs@leap.se>2013-04-16 18:49:35 -0300
commit716bec111f4ba319419dd8e4abb7af7905b495ac (patch)
treea4c7f14c53a4fcbf4b1cc28d0f303103e40917e8 /src/leap
parent11e24c647b2c22fd0a7b2d49c2217f7e4ba57a66 (diff)
Add 'get_all_docs()'.
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/soledad/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index c682b1ee..f88a68bf 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -601,6 +601,19 @@ class Soledad(object):
check_for_conflicts=check_for_conflicts,
include_deleted=include_deleted)
+ def get_all_docs(self, include_deleted=False):
+ """Get the JSON content for all documents in the database.
+
+ @param include_deleted: If set to True, deleted documents will be
+ returned with empty content. Otherwise deleted documents will not
+ be included in the results.
+ @return: (generation, [Document])
+ The current generation of the database, followed by a list of all
+ the documents in the database.
+ """
+ return self._db.get_all_docs(include_deleted)
+
+
def create_doc(self, content, doc_id=None):
"""
Create a new document in the local encrypted database.