bijoe: add a count method to EngineCube
This commit is contained in:
parent
cf539e86a7
commit
9e127bd700
|
@ -89,6 +89,11 @@ class EngineCube(object):
|
|||
def __getattr__(self, name):
|
||||
return getattr(self.cube, name)
|
||||
|
||||
def count(self):
|
||||
cursor = self.engine.get_cursor()
|
||||
cursor.execute('SELECT count(%s) FROM %s' % (self.key, self.fact_table))
|
||||
return cursor.fetchone()[0]
|
||||
|
||||
def sql_query(self, filters, drilldown, measures, **kwargs):
|
||||
cursor = self.engine.get_cursor()
|
||||
|
||||
|
|
Reference in New Issue