Esempio n. 1
0
 def table(self):
     if isinstance(self.query['table'], basestring):
         return Table(self.query['table'])
     if not self.query['table'] and isinstance(self._bindobj, Query):
         return Table(self._bindobj._alias or token())
     return clause(self.query['table'])
Esempio n. 2
0
 def orderclauses(self):
     if not self.query.get('order_by'):
         return []
     return [clause(w) for w in self.query['order_by']]
Esempio n. 3
0
 def whereclauses(self):
     if not self.query.get('where'):
         return []
     return [clause(w) for w in self.query['where']]
Esempio n. 4
0
 def groupclauses(self):
     if not self.query.get('group_by'):
         return []
     return [clause(g) for g in self.query['group_by']]
Esempio n. 5
0
 def columns(self):
     if not self.query.get('columns'):
         return []
     return [clause(c) for c in self.query['columns']]