def post_UNARY_OPERATE(self, value, operation, suffix=True): with alias_only_context(True): # pylint: disable=E sql_piece, params = self.translate(value) if suffix: return '{} {}'.format(sql_piece, operation), params return '{} ({})'.format(operation, sql_piece), params
def post_FROM(self, arg): with alias_only_context(False): # pylint: disable=E sql_piece, params = self.translate(arg) return 'FROM {}'.format(sql_piece), params
def post_ORDER_BY(self, exp): with alias_only_context(True): # pylint: disable=E sql_piece, params = self.translate(exp) return 'ORDER BY {}'.format(sql_piece), params