| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug where by ROW_NUMBER OVER clause applied for OFFSET
selects in SQL Server would inappropriately substitute a plain column
from the local statement that overlaps with a label name used by
the ORDER BY criteria of the statement.
Change-Id: Ic2500c886cbfc83a1ad5a2681783f008b9f23838
Fixes: #3711
(cherry picked from commit a4be7c92393e08607dc46f318e97803519052a93)
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug whereby passing a :func:`.text` construct to the
:meth:`.Query.group_by` method would raise an error, instead
of intepreting the object as a SQL fragment.
Change-Id: I5fc2f590b76508d52e23b5fa9cf037ddea8080c3
fixes: #3706
(cherry picked from commit 9bdd6f2b1f6b34a82b77849ec05811aa0279931d)
|
|
|
|
|
| |
This makes the docstring example code compatible with both Python 2 and Python 3.
(cherry picked from commit 8aa7369125f831a74c9f024ce5dde73ecf812e63)
|
|
|
|
|
|
|
|
|
| |
be properly typed as boolean in the result, and also would fail to be
anonymously aliased in a SELECT list as is the case with a
non-negated EXISTS construct.
fixes #3682
(cherry picked from commit 07a4b6cbcda6e6ee6e67893c5a5d2fd01e5f125f)
|
|
|
|
|
|
| |
#3666.
(cherry picked from commit 399f92cd116b747f742b919ac9a3e79eb0637e8a)
|
|
|
|
|
| |
we're trying to hit columns without names yet and such, to suit the bug
right now just make it specific to FunctionElement
|
|
|
|
|
|
|
|
|
|
|
| |
passed to :func:`.column_property`, so that if the same attribute
is referred to as a column expression twice the names are de-duped,
thus avoiding "ambiguous column" errors. Previously, the
``.label(None)`` would need to be applied in order for the name
to be de-anonymized.
fixes #3663
(cherry picked from commit 0210695bd97e76f58d8781b69337816501482fb0)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
8ad968f33100baeb3b13c7e0b724b6b79ab4277f
for ref #3657. The Oracle dialect makes more use of the "select_wraps_for"
feature than SQL server because Oracle doesn't have "TOP" for a limit-only
select, so tests are showing more happening here. In the case where
the select() has some dupe columns, these are deduped from the .c collection
so a positional match between the wrapper and original can't use .inner_columns,
because these collections wont match. Using _columns_plus_names
instead which is the deduped collection that determines the SELECT display,
which definitely have to match up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handled within visit_select(); this attribute was added in the
1.0 series to accommodate the subquery wrapping behavior of
SQL Server and Oracle while also working with positional
column targeting and no longer relying upon "key fallback"
in order to target columns in such a statement. The IBM DB2
third-party dialect also has this use case, but its implementation
is using regular expressions to rewrite the textual SELECT only
and does not make use of a "wrapped" select at this time.
The logic no longer attempts to reconcile proxy set collections as
this was not deterministic, and instead assumes that the select()
and the wrapper select() match their columns postionally,
at least for the column positions they have in common,
so it is now very simple and safe. fixes #3657.
- as a side effect of #3657 it was also revealed that the
strategy of calling upon a ResultProxy._getter was not
correctly calling into NoSuchColumnError when an expected
column was not present, and instead returned None up to
loading.instances() to produce NoneType failures; added
a raiseerr argument to _getter() which is called when we
aren't expecting None, fixes #3658.
(cherry picked from commit 8ad968f33100baeb3b13c7e0b724b6b79ab4277f)
|
|
|
|
|
|
| |
exactly
(cherry picked from commit c97aa63789036fc145503f03123275253ae02d2c)
|
|
|
|
|
|
| |
here, fixes #3652
(cherry picked from commit e310a8e423d9a4eeb511b7b84dbeccc90c234a1f)
|
|
|
|
|
| |
present in the commit for master, having been inadvertently committed
on February 3. Source of this line is c1316a299257fae8264c8038d83e415f4605fde7.
|
|
|
|
|
|
|
| |
- move tests to CRUDTest
- changelog, fixes #3643
(cherry picked from commit 150591f9e0a94902cb2a76b68ac7c9d8a1a3ec83)
|
|
|
|
| |
(cherry picked from commit c9b03fa8afd52646aba8c59fc038330eeee6db60)
|
|
|
|
|
|
|
|
|
|
|
| |
override with a column expression (e.g. by using ``'x' in col``)
would cause an endless loop in the case of an ARRAY type, as Python
defers this to ``__getitem__`` access which never raises for this
type. Overall, all use of ``__contains__`` now raises
NotImplementedError.
fixes #3642
(cherry picked from commit e0a580b3d055a600afae61840058a5a30ef5fe74)
|
|
|
|
| |
(cherry picked from commit 859379e2fcc4506d036700ba1eca4c0ae526a8ee)
|
|
|
|
|
|
|
| |
what's given so we need to use a set() here. contains_column is not within
any performance paths
(cherry picked from commit 5742e321b261c0c1303835b80418cd3cdc1b5643)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
need this collection except in the extend/update uses where we
create it ad-hoc. simplifies pickling. Compatibility with 1.0
should be OK as ColumnColleciton uses __getstate__ in any case
and the __setstate__ contract hasn't changed.
- Fixed bug in :class:`.Table` metadata construct which appeared
around the 0.9 series where adding columns to a :class:`.Table`
that was unpickled would fail to correctly establish the
:class:`.Column` within the 'c' collection, leading to issues in
areas such as ORM configuration. This could impact use cases such
as ``extend_existing`` and others. fixes #3632
(cherry picked from commit 8163de4cc9e01460d3476b9fb3ed14a5b3e70bae)
|
|
|
|
|
|
| |
create confusion for inherited classes such as BYTEA, fixes
(cherry picked from commit 47d8858c54401cdf10285b7935049faf87432f55)
|
|
|
|
|
|
|
| |
for SQL fragments; we've deprecated that in 1.0 and its a good idea
to document like this for 0.9 as well.
(cherry picked from commit d5d7284bdd0ffc96e7a79354944627cf9b5d8e4d)
|
|
|
|
|
|
|
|
|
|
| |
no longer called for an UPDATE or DELETE statement emitted via plain
text or via the :func:`.text` construct, affecting those drivers
that erase cursor.rowcount once the cursor is closed such as SQL
Server ODBC and Firebird drivers.
fixes #3622
(cherry picked from commit 197ffa2be2cadce3df8bfb0799b3c80158250286)
|
|
|
|
| |
(cherry picked from commit 738d515b95f1ff94d7dfd265883237d247d1c153)
|
|
|
|
|
| |
remove "undoc members" that was putting some random server_default
atributes from ColumnClause
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
insert-default holding columns not otherwise included in the SET
clause (such as primary key cols) to get rendered into the RETURNING
even though this is an UPDATE.
- Major fixes to the :paramref:`.Mapper.eager_defaults` flag, this
flag would not be honored correctly in the case that multiple
UPDATE statements were to be emitted, either as part of a flush
or a bulk update operation. Additionally, RETURNING
would be emitted unnecessarily within update statements.
fixes #3609
(cherry picked from commit 0e4c4d7efc08d04c3c0ae960428b08ada37e4a91)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the :class:`.Select` construct would have its ``._raw_columns``
collection mutated in-place when compiling the :class:`.Insert`
construct, when the target :class:`.Table` has Python-side defaults.
The :class:`.Select` construct would compile standalone with the
erroneous column present subsequent to compilation of the
:class:`.Insert`, and the the :class:`.Insert` statement itself would
fail on a second compile attempt due to duplicate bound parameters.
fixes #3603
(cherry picked from commit e57bf796169282f69187f50665f5ea233c2c9ab7)
|
|
|
|
|
|
|
|
|
| |
such as a CHECK constraint would render an erroneous comma in the
definition; this scenario can occur such as with a Postgresql
INHERITS table that has no columns of its own.
fixes #3598
(cherry picked from commit 9695faf32981406b12a6468b98d5c9b673f8e219)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, this query:
SELECT s1.users.name FROM s1.users FOR UPDATE OF s1.users
should actually be:
SELECT s1.users.name FROM s1.users FOR UPDATE OF users
fixes #3573
(cherry picked from commit fd47fea6fbb11ee84b7eea5772f40855703ebe47)
|
|
|
|
|
|
|
|
|
|
|
|
| |
statement. This feature is available by passing the
:paramref:`~.sqlalchemy.sql.expression.update.preserve_parameter_order`
flag either to the core :class:`.Update` construct or alternatively
adding it to the :paramref:`.Query.update.update_args` dictionary at
the ORM-level, also passing the parameters themselves as a list of 2-tuples.
Thanks to Gorka Eguileor for implementation and tests.
adapted from pullreq github:200
(cherry picked from commit c90f0a49f332867f6b337c79ddf192299788667f)
|
|
|
|
| |
(cherry picked from commit 98c1dcc6bcade313a254fe11e8efa3c5b5ad959e)
|
|
|
|
|
|
|
|
|
|
| |
insert statement, :ticket:`3288`, where the column type for the
default-holding column would not be propagated to the compiled
statement in the case where the default was being used,
leading to bind-level type handlers not being invoked.
fixes #3520
(cherry picked from commit c39ff9978dbb77cbea4f1ee08234887d8aa1b165)
|
|
|
|
|
| |
`to_unicode` variable was created but was not used.
(cherry picked from commit 69fcabb335130bd0f6e9889c5b191c68192559b5)
|
|
|
|
| |
(cherry picked from commit 2e52f877638ded9d8440fa94632bff0f1705a83e)
|
|
|
|
|
| |
- test for .cast() method has no good place now except for
test_cast in test_compiler.py
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
un-adjusted internal symbol names for "anonymous" labels, which
are the "foo_1" types of labels we see generated for SQL functions
without labels and similar. This was a side effect of the
performance enhancements implemented as part of references #918.
fixes #3483
|
| |
| |
| |
| |
| |
| | |
in conjunction with :func:`.and_` or :func:`.or_` would fail
with an AttributeError.
fixes #3490
|
| |
| |
| |
| |
| |
| |
| | |
of :class:`.FunctionElement` or other column element that incorrectly
states 'None' or any other invalid object as the ``.type``
attribute will report this exception instead of recursion overflow.
fixes #3485
|
|\ \ |
|
| | | |
|
| | |
| | |
| | |
| | | |
- changelog for pullreq github:186
|
|\ \ \
| |/ /
|/| | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
|/
|
|
|
|
| |
"multiple parameter sets" there is a much more common case
which works equally well for INSERT/UPDATE/DELETE e.g.
executemany(). reference #3476
|
|
|
|
|
|
|
| |
features that other objects like :class:`.Index` now do, that
the column expression may be specified as an arbitrary SQL
expression such as :obj:`.cast` or :obj:`.text`.
fixes #3454
|
|
|
|
|
|
|
|
|
|
|
|
| |
object would fail to accommodate the labeled SQL expression
in all cases, such that any SQL operation that made use of
:meth:`.Label.self_group` would use the original unadapted
expression. One effect of this would be that an ORM :func:`.aliased`
construct would not fully accommodate attributes mapped by
:obj:`.column_property`, such that the un-aliased table could
leak out when the property were used in some kinds of SQL
comparisons.
fixes #3445
|