summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-08-27 11:21:25 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-08-27 11:22:05 -0400
commit410be197ef5df234205b35f0d318b106a34e7f92 (patch)
tree369b0217b874a68190833f5884b8a37f3043d159 /test/dialect/postgresql
parente2209f7534255855f33a2afedac913fbefe37484 (diff)
downloadsqlalchemy-410be197ef5df234205b35f0d318b106a34e7f92.tar.gz
- add a postgresql-specific form of array_agg() that injects the
ARRAY type, references #3132
Diffstat (limited to 'test/dialect/postgresql')
-rw-r--r--test/dialect/postgresql/test_types.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py
index a625e1cee..8eab9d4b9 100644
--- a/test/dialect/postgresql/test_types.py
+++ b/test/dialect/postgresql/test_types.py
@@ -859,6 +859,17 @@ class ArrayTest(AssertsCompiledSQL, fixtures.TestBase):
"ARRAY[%(param_4)s, %(param_5)s, %(param_6)s]))[%(param_7)s]"
)
+ def test_array_agg_generic(self):
+ expr = func.array_agg(column('q', Integer))
+ is_(expr.type.__class__, types.Array)
+ is_(expr.type.item_type.__class__, Integer)
+
+ def test_array_agg_specific(self):
+ from sqlalchemy.dialects.postgresql import array_agg
+ expr = array_agg(column('q', Integer))
+ is_(expr.type.__class__, postgresql.ARRAY)
+ is_(expr.type.item_type.__class__, Integer)
+
class ArrayRoundTripTest(fixtures.TablesTest, AssertsExecutionResults):