Skip to content

Commit 1004237

Browse files
committed
add size on disk property
1 parent b296484 commit 1004237

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

datajoint/schema.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ def __repr__(self):
7878

7979
@property
8080
def size_on_disk(self):
81+
"""
82+
:return: size of the database in bytes
83+
"""
8184
return float(self.connection.query(
8285
"""SELECT Sum(data_length + index_length) FROM information_schema.tables WHERE table_schema='{}';""".format(
8386
self.database)).fetchone()[0])

0 commit comments

Comments
 (0)