diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-11 19:33:06 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-11 19:33:06 +0000 |
commit | 85d335b01bf64a27e99cee915205afd99e7191b5 (patch) | |
tree | 24afce742247b27fe02da2ab32635cd7ff8590cc /test/sql/test_select.py | |
parent | 9d7335f934d3197f572017865220897763d4582b (diff) | |
download | sqlalchemy-85d335b01bf64a27e99cee915205afd99e7191b5.tar.gz |
- The type/expression system now does a more complete job
of determining the return type from an expression
as well as the adaptation of the Python operator into
a SQL operator, based on the full left/right/operator
of the given expression. In particular
the date/time/interval system created for Postgresql
EXTRACT in [ticket:1647] has now been generalized into
the type system. The previous behavior which often
occured of an expression "column + literal" forcing
the type of "literal" to be the same as that of "column"
will now usually not occur - the type of
"literal" is first derived from the Python type of the
literal, assuming standard native Python types + date
types, before falling back to that of the known type
on the other side of the expression. Also part
of [ticket:1683].
Diffstat (limited to 'test/sql/test_select.py')
-rw-r--r-- | test/sql/test_select.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sql/test_select.py b/test/sql/test_select.py index 766ce8e9b..657509d65 100644 --- a/test/sql/test_select.py +++ b/test/sql/test_select.py @@ -645,7 +645,7 @@ sq.myothertable_othername AS sq_myothertable_othername FROM (" + sqstring + ") A (table1.c.myid.match('somstr'), "CONTAINS (mytable.myid, :myid_1)", oracle.dialect()), ]: self.assert_compile(expr, check, dialect=dialect) - + def test_composed_string_comparators(self): self.assert_compile( table1.c.name.contains('jo'), "mytable.name LIKE '%%' || :name_1 || '%%'" , checkparams = {'name_1': u'jo'}, @@ -1377,7 +1377,7 @@ EXISTS (select yay from foo where boo = lar)", assert [str(c) for c in s.c] == ["id", "hoho"] - + @testing.emits_warning('.*empty sequence.*') def test_in(self): self.assert_compile(table1.c.myid.in_(['a']), @@ -1547,7 +1547,7 @@ EXISTS (select yay from foo where boo = lar)", "SELECT dt.date FROM dt WHERE dt.date BETWEEN :date_1 AND :date_2", checkparams={'date_1':datetime.date(2006,6,1), 'date_2':datetime.date(2006,6,5)}) self.assert_compile(table.select(sql.between(table.c.date, datetime.date(2006,6,1), datetime.date(2006,6,5))), - "SELECT dt.date FROM dt WHERE dt.date BETWEEN :param_1 AND :param_2", checkparams={'param_1':datetime.date(2006,6,1), 'param_2':datetime.date(2006,6,5)}) + "SELECT dt.date FROM dt WHERE dt.date BETWEEN :date_1 AND :date_2", checkparams={'date_1':datetime.date(2006,6,1), 'date_2':datetime.date(2006,6,5)}) def test_operator_precedence(self): table = Table('op', metadata, |