We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 05badcd + 1004237 commit 59eaba3Copy full SHA for 59eaba3
datajoint/schema.py
@@ -76,6 +76,15 @@ def __repr__(self):
76
database=self.database,
77
context=self.context['__name__'] if '__name__' in self.context else "__")
78
79
+ @property
80
+ def size_on_disk(self):
81
+ """
82
+ :return: size of the database in bytes
83
84
+ return float(self.connection.query(
85
+ """SELECT Sum(data_length + index_length) FROM information_schema.tables WHERE table_schema='{}';""".format(
86
+ self.database)).fetchone()[0])
87
+
88
def spawn_missing_classes(self):
89
"""
90
Creates the appropriate python user relation classes from tables in the database and places them
0 commit comments