diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-08-11 10:54:49 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-08-11 20:26:27 -0400 |
| commit | 97d2a2091ed4caee1e19168d0db39e4d94a6d12f (patch) | |
| tree | 2540d73d73d5638562bdbd1d4c79bf23c60c6779 /lib/sqlalchemy/testing/requirements.py | |
| parent | f5e57f7c311288d892894edcc44d901b5bfbb3d1 (diff) | |
| download | sqlalchemy-97d2a2091ed4caee1e19168d0db39e4d94a6d12f.tar.gz | |
Use ternary when running conditional with Query._offset
Fixed bug where using :meth:`.Query.first` or a slice expression in
conjunction with a query that has an expression based "offset" applied
would raise TypeError, due to an "or" conditional against "offset" that did
not expect it to be a SQL expression as opposed to an integer or None.
Fixes: #4803
Change-Id: I56b97a5d23cb45427a27a90ab557fa1ac5c6739e
Diffstat (limited to 'lib/sqlalchemy/testing/requirements.py')
| -rw-r--r-- | lib/sqlalchemy/testing/requirements.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 04537905b..62e600eaa 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -112,6 +112,15 @@ class SuiteRequirements(Requirements): return exclusions.open() @property + def sql_expression_limit_offset(self): + """target database can render LIMIT and/or OFFSET with a complete + SQL expression, such as one that uses the addition operator. + parameter + """ + + return exclusions.open() + + @property def parens_in_union_contained_select_w_limit_offset(self): """Target database must support parenthesized SELECT in UNION when LIMIT/OFFSET is specifically present. |
