From 716bec111f4ba319419dd8e4abb7af7905b495ac Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 16 Apr 2013 18:49:35 -0300 Subject: Add 'get_all_docs()'. --- src/leap/soledad/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') 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. -- cgit v1.2.3