Skip to content

Commit f05b5e7

Browse files
committed
Added minor documentation
1 parent d59a787 commit f05b5e7

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

filexdb/database.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,23 @@ def show_collections(self) -> JsonArray:
5555

5656
return _result
5757

58-
def show(self) -> Document:
58+
def export(self, _file_name, _file_dir=None, _mode="json"):
5959
"""
60+
Export data in to readable file.
6061
61-
:return: Database
62+
:param _file_name: File name in which data will be exported.
63+
:param _file_dir: Parent directory of export file.
64+
:param _mode: In which file mode you want to export data.
65+
:return: None.
6266
"""
63-
self._database = self._file_handler.read()
64-
return Document(self._database, False)
6567

66-
def export(self, _file_name, _file_dir=None, _mode="json"):
67-
"""
68+
e = Export(self._show(), _file_name, _file_dir, _mode)
6869

69-
:param _file_name:
70-
:param _file_dir:
71-
:param _mode:
72-
:return:
70+
def _show(self) -> Document:
7371
"""
72+
Shows the hole Database.
7473
75-
e = Export(self.show(), _file_name, _file_dir, _mode)
74+
:return: Database
75+
"""
76+
self._database = self._file_handler.read()
77+
return Document(self._database, False)

0 commit comments

Comments
 (0)