Skip to content

Commit

Permalink
Query obj
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Aug 3, 2015
1 parent 28c0292 commit 2d192d1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions app/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,31 @@
'target_div': 'chart',
}

class BaseQuery(object):
def __init__(
self, groupby, metrics, filters,
is_timeseries,
timeseries_limit=15, row_limit=None):
self.groupby = groupby
self.metrics = metrics
self.filters = filters
self.is_timeseries = is_timeseries
self.timeseries_limit = timeseries_limit
self.row_limit = row_limit

def run(self):
start = datetime.now()
self._execute()
self.duration = (datetime.now() - start).total_seconds()

def _execution(self):
raise NotImplemented()

def pandas_df(self):
raise NotImplemented()



class OmgWtForm(Form):
field_order = (
'viz_type', 'granularity', 'since', 'group_by', 'limit')
Expand Down

0 comments on commit 2d192d1

Please sign in to comment.