def __str__(self): value = self.value if value is True: expr_str = 'true' elif value is False: expr_str = 'false' elif value is None: expr_str = 'null' elif isinstance(value, (datetime, date)): expr_str = utils.escape(value.strftime('%Y/%m/%d %H:%M:%S.%f')) else: expr_str = utils.escape(utils.to_text(value)) # TODO: Geo point, Array return expr_str
def __str__(self): expr_str = utils.to_text(getattr(self.value, 'lvalue', self.value)) return utils.escape(expr_str)
def __str__(self): return utils.to_text('select --table %s %s' % ( self._table.__tablename__, self._condition())).strip()
def __str__(self): return utils.to_text(getattr(self.value, 'lvalue', self.value))
def test_to_text(value, expected): assert utils.to_text(value) == expected