diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-09 14:32:38 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-09 14:32:38 -0500 |
commit | e9b059f782487ea375706dc32c5c79b8340df19a (patch) | |
tree | 08948c9864035a5bdb26ab4c63484e017f22edfc | |
parent | 969c04860fa5b9b3fc33253a2e4a706a5ddb16f6 (diff) | |
download | sqlalchemy-e9b059f782487ea375706dc32c5c79b8340df19a.tar.gz |
base tests pass
-rw-r--r-- | lib/sqlalchemy/orm/properties.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/expression.py | 2 | ||||
-rw-r--r-- | test/dialect/test_postgresql.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index 56a03fc7c..e900b0cab 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -134,7 +134,7 @@ class ColumnProperty(StrategizedProperty): def reverse_operate(self, op, other, **kwargs): col = self.__clause_element__() - return op(col._bind_param(other), col, **kwargs) + return op(col._bind_param(op, other), col, **kwargs) # TODO: legacy..do we need this ? (0.5) ColumnComparator = Comparator diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index e4a610e5d..c559f3850 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -2167,7 +2167,7 @@ class _BindParamClause(ColumnElement): if _compared_to_type is not None: self.type = _compared_to_type._coerce_compared_value(_compared_to_operator, value) else: - self.type = sqltypes.NULLTYPE + self.type = sqltypes.type_map.get(type(value), sqltypes.NULLTYPE) elif isinstance(type_, type): self.type = type_() else: diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index b002e7f19..8358825c4 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -106,7 +106,7 @@ class CompileTest(TestBase, AssertsCompiledSQL): self.assert_compile(schema.CreateIndex(idx), "CREATE INDEX test_idx1 ON testtbl (data) WHERE data > 5 AND data < 10", dialect=postgresql.dialect()) - + def test_extract(self): t = table('t', column('col1', DateTime), column('col2', Date), column('col3', Time), column('col4', postgresql.INTERVAL) |