コード例 #1
0
    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')
コード例 #2
0
 def _select(self):
     return db.select(['*', db.expr('CONCAT(`group`, ":", CAST(`timestamp` AS CHAR)) AS `id`')]).from_table(self._table);