summaryrefslogtreecommitdiff
path: root/test/sql/query.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-02-27 19:04:43 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-02-27 19:04:43 +0000
commitba5337982e76e587b2c5148285b41a9a399806aa (patch)
treed59f945203e09d963a7e7e7dcee251fc04467716 /test/sql/query.py
parent962c22c9eda7d2ab7dc0b41bd1c7a52cf0c9d008 (diff)
downloadsqlalchemy-ba5337982e76e587b2c5148285b41a9a399806aa.tar.gz
- fixed function execution with explicit connections, when you dont
explicitly say "select()" off the function, i.e. conn.execute(func.dosomething())
Diffstat (limited to 'test/sql/query.py')
-rw-r--r--test/sql/query.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/sql/query.py b/test/sql/query.py
index a7cb52dc4..f9ba9409d 100644
--- a/test/sql/query.py
+++ b/test/sql/query.py
@@ -232,6 +232,16 @@ class QueryTest(PersistTest):
z = testbase.db.func.current_date().scalar()
assert x == y == z
+ def test_conn_functions(self):
+ conn = testbase.db.connect()
+ try:
+ x = conn.execute(func.current_date()).scalar()
+ y = conn.execute(func.current_date().select()).scalar()
+ z = conn.scalar(func.current_date())
+ finally:
+ conn.close()
+ assert x == y == z
+
def test_update_functions(self):
"""test sending functions and SQL expressions to the VALUES and SET clauses of INSERT/UPDATE instances,
and that column-level defaults get overridden"""