def fetch_groups(self, group_as_key=False): group = None, if group_as_key: group = 'group' return db.select().from_table(self._table).group_by('group').execute(self._db).as_array(group, 'group')
def _select(self): return db.select(['*', db.expr('CONCAT(`group`, ":", CAST(`timestamp` AS CHAR)) AS `id`')]).from_table(self._table);