From e8600608669d90c4a6385b312d271aed63eb5854 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Wed, 2 Sep 2020 23:46:06 +0200 Subject: Update select usage to use the new 1.4 format This change includes mainly that the bracketed use within select() is moved to positional, and keyword arguments are removed from calls to the select() function. it does not yet fully address other issues such as keyword arguments passed to the table.select(). Additionally, allows False / None to both be considered as "disable" for all of select.correlate(), select.correlate_except(), query.correlate(), which establishes consistency with passing of ``False`` for the legact select(correlate=False) argument. Change-Id: Ie6c6e6abfbd3d75d4c8de504c0cf0159e6999108 --- lib/sqlalchemy/dialects/postgresql/array.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/sqlalchemy/dialects/postgresql/array.py') diff --git a/lib/sqlalchemy/dialects/postgresql/array.py b/lib/sqlalchemy/dialects/postgresql/array.py index 7fd271d52..dacf1e2c2 100644 --- a/lib/sqlalchemy/dialects/postgresql/array.py +++ b/lib/sqlalchemy/dialects/postgresql/array.py @@ -53,9 +53,7 @@ class array(expression.ClauseList, expression.ColumnElement): from sqlalchemy.dialects import postgresql from sqlalchemy import select, func - stmt = select([ - array([1,2]) + array([3,4,5]) - ]) + stmt = select(array([1,2]) + array([3,4,5])) print(stmt.compile(dialect=postgresql.dialect())) @@ -76,11 +74,11 @@ class array(expression.ClauseList, expression.ColumnElement): recursively adding the dimensions of the inner :class:`_types.ARRAY` type:: - stmt = select([ + stmt = select( array([ array([1, 2]), array([3, 4]), array([column('q'), column('x')]) ]) - ]) + ) print(stmt.compile(dialect=postgresql.dialect())) Produces:: -- cgit v1.2.1