| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed regression in JSON datatypes where the "literal processor" for
a JSON index value, that needs to take effect for example within DDL,
would not be invoked for the value. The native String and Integer
datatypes are now called upon from within the JSONIndexType
and JSONPathType. This is applied to the generic, Postgresql, and
MySQL JSON types.
Change-Id: Ifa5f2acfeee57a79d01d7fc85d265a37bd27c716
Fixes: #3765
|
|
|
|
|
| |
Change-Id: I23a6abb26bbbe3d118887d043ce761fc4572d8d2
Fixes: #3766
|
|
|
|
|
|
|
|
|
|
|
| |
The change in Index for 1.1 combined with the fix for
ref #3763 still fails to deliver the correct object
resolved by __clause_element__() to the list of expressions
for compilation. Make sure we use the expression that's
been unwrapped from __clause_element__().
Change-Id: Ie1df8db5090de665048331786f0024d52851923f
Fixes: #3763
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed bug where :class:`.Index` would fail to extract columns from
compound SQL expressions if those SQL expressions were wrapped inside
of an ORM-style ``__clause_element__()`` construct. This bug
exists in 1.0.x as well, however in 1.1 is more noticeable as
hybrid_property @expression now returns a wrapped element.
Fixes: #3763
Change-Id: I992536386503a1fb3f2305790abe008d72c44c4a
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
It wasn't clear how this differs from order_by(None);
add more tests and document that this has to do with whether or
not mapper.order_by will be re-enabled as well.
Change-Id: I332e8ac60c999b38c5a243f1cb72de3cf77891b6
|
| |
| |
| |
| |
| |
| |
| | |
and test/sql/test_metadata IndexTest into
test/sql/test_metadata ConstraintTest
Change-Id: I7aeee9a1edbbd889200afc393695f73d5fbac3f3
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This replicates the same behavior as order_by().
order_by() will also be updated to deprecate passing
of False as this is no longer functionally different
than passing None.
Change-Id: I2fc05d0317d28b6c83373769a48f7eea32d56290
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/297
|
|/
|
|
|
|
|
|
| |
PyMySQL upstream has released 0.7.6 which should resolve
JSON encoding issues.
Change-Id: Icf543d48dace1419a0aac78bdb15ec666f0edafe
Fixes: #3754
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug in :class:`.Table` where the internal method
``_reset_exported()`` would corrupt the state of the object. This
method is intended for selectable objects and is called by the ORM
in some cases; an erroneous mapper configuration would could lead the
ORM to call this on on a :class:`.Table` object.
Change-Id: I63fa34ee0cdf16358bb125c556390df79758bcbc
Fixes: #3755
|
|
|
|
| |
Change-Id: I39a574ea72f5c7af0084dee3169679c5f534cb8b
|
|
|
|
| |
Change-Id: I4f935cce878eb1678b432f4cb4ba6ee122f8e9d4
|
|
|
|
| |
Change-Id: Ied4245433d0d7b469dae6e7394c4931d8405f387
|
|
|
|
|
|
|
|
|
|
| |
Removed a warning that dates back to 0.4 which emits when a same-named
relationship is placed on two mappers that inherits via joined or
single table inheritance. The warning does not apply to the
current unit of work implementation.
Change-Id: If528ec3a2f4dc60712d9044fd1ec6c4dfbf0eadb
Fixes: #3749
|
|\ |
|
| |
| |
| |
| |
| |
| | |
And force to use keyword arguments for trivial parameters in index_property
Change-Id: I12a178128182f77a2d06b52d7e36f59a36b45a33
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed bug in new CTE feature for update/insert/delete whereby
an anoymous (e.g. no name passed) :class:`.CTE` construct around
the statement would fail. The Alias base class of CTE checks
for the "named_with_column" attribute in order to detect if
the underlying selectable has a name; UpdateBase now provides
this as False.
Change-Id: I4b0309db21379a4c0cb93085298c86da3cf840e4
Fixes: #3744
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed bug in new CTE feature for update/insert/delete stated
as a CTE inside of an enclosing statement (typically SELECT) whereby
oninsert and onupdate values weren't called upon for the embedded
statement.
This is accomplished by consulting prefetch
for all statements. The collection is also broken into
separate insert/update collections so that we don't need to
consult toplevel self.isinsert to determine if the prefetch
is for an insert or an update. What we don't yet test for
are CTE combinations that have both insert/update in one
statement, though these should now work in theory provided
the underlying database supports such a statement.
Change-Id: I3b6a860e22c86743c91c56a7ec751ff706f66f64
Fixes: #3745
|
|/
|
|
|
|
|
|
|
|
| |
Fix improper capture of a loop variable inside a lambda during unbaking
of subquery eager loaders, which would cause the incorrect query
to be invoked.
Fixes: #3743
Change-Id: I995110deb8ee2dae8540486729e1ae64578d28fc
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/290
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This modifies the Oracle ROWNUM limit/offset approach
to accommodate for the "OF" clause in a "FOR UPDATE"
phrase. The column expressions must be added to the selected
subquery if necessary and adapted on the outside.
Change-Id: Ia71b5fc4df6d326e73863f8ae9f96e8f1a5acfc1
Fixes: #3741
|
|/
|
|
|
|
|
| |
It was raising AttributeError for key accessing in dict,
but raising IndexError for index accessing in array.
Change-Id: I58a2252a9e8d7f78cabcefcbe7223a4f3a729115
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the dialect impl memoization for TypeDecorator
necessarily keeps the top-level TypeDecorator type
around, since a user-defined type will have bind and result
set processing behavior. For both TypeDecorator and Variant,
PG dialect needs to ensure it's looking at the SQLAlchemy
type to check for SmallInteger / BigInteger.
Fixes: 3739
Change-Id: I2d45fb997f17c6272d6bb826a77d2dba665adae7
(cherry picked from commit 421fa6b8bf9f0c3c5041579c89ec405ce0f5e0b0)
|
|
|
|
|
|
|
|
|
|
| |
Fixed issue in SQL math negation operator where the type of the
expression would no longer be the numeric type of the original.
This would cause issues where the type determined result set
behaviors.
Change-Id: If0e339614a3686e251235fc94b6f59310c4630a5
Fixes: #3735
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed bug whereby the ``__getstate__`` / ``__setstate__``
methods for sqlalchemy.util.Properties were
non-working due to the transition in the 1.0 series to ``__slots__``.
The issue potentially impacted some third-party applications.
Pull request courtesy Pieter Mulder.
Fixes: #3728
Change-Id: I01ebd425bbfe145747fea2edd0d2d412c74fd84d
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/286
(cherry picked from commit cab57e9bab04fbdea44690c08dff379a29eaab32)
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Made a slight behavioral change in the ``sqlalchemy.ext.compiler``
extension, whereby the existing compilation schemes for an established
construct would be removed if that construct was itself didn't already
have its own dedicated ``__visit_name__``. This was a
rare occurrence in 1.0, however in 1.1 :class:`.postgresql.ARRAY`
subclasses :class:`.sqltypes.ARRAY` and has this behavior.
As a result, setting up a compilation handler for another dialect
such as SQLite would render the main :class:`.postgresql.ARRAY`
object no longer compilable.
Fixes: #3732
Change-Id: If2c1ada4eeb09157885888e41f529173902f2b49
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The processing performed by the :class:`.Boolean` datatype for backends
that only feature integer types has been made consistent between the
pure Python and C-extension versions, in that the C-extension version
will accept any integer value from the database as a boolean, not just
zero and one; additionally, non-boolean integer values being sent to
the database are coerced to exactly zero or one, instead of being
passed as the original integer value.
Change-Id: I01e647547fd7047bd549dd70e1fa202c51e8328b
Fixes: #3730
|
|
|
|
|
|
|
|
|
|
|
| |
Dialed back the "order the primary key columns per auto-increment"
described in :ref:`change_mysql_3216` a bit, so that if the
:class:`.PrimaryKeyConstraint` is explicitly defined, the order
of columns is maintained exactly, allowing control of this behavior
when necessary.
Change-Id: I9e7902c57a96c15968a6abf53e319acf15680da0
Fixes: #3726
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rolled back the validation rules a bit in :class:`.Enum` to allow
unknown string values to pass through, unless the flag
``validate_string=True`` is passed to the Enum; any other kind of object is
still of course rejected. While the immediate use
is to allow comparisons to enums with LIKE, the fact that this
use exists indicates there may be more unknown-string-comparsion use
cases than we expected, which hints that perhaps there are some
unknown string-INSERT cases too.
Change-Id: I7d1d79b374a7d47966d410998f77cd19294ab7b0
Fixes: #3725
|
|
|
|
|
|
|
| |
Allows custom dialects to add keywords after the
CREATE TABLE section.
Change-Id: I6fa66dfcf00ef95122f491a9115410df2746cf88
|
|
|
|
| |
Change-Id: Ie4cb4924909d55c5962f66e36cd5325e8e8f0538
|
|
|
|
| |
Change-Id: I74e369d1d71c98cb0af58dde80b7d535d17cbdf7
|
|
|
|
|
|
|
|
|
|
| |
The TABLESAMPLE clause allows randomly selecting an approximate percentage
of rows from a table. At least DB2, Microsoft SQL Server and recent
Postgresql support this standard clause.
Fixes: #3718
Change-Id: I3fb8b9223e12a57100df30876b461884c58d72fa
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/277
|
|
|
|
|
|
|
|
|
| |
Add `sqlalchemy.ext.index.index_property`
which subscribe an index of a column with `Indexable` type.
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I238c23131e4fded5dc7f7a25eb02e26008099d00
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/235
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Fixes: #3529
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Ie3bf6ad70d9be9f0e44938830e922db03573991a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/258
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
count() here is misleading in that it not only
counts from an arbitrary column in the table, it also
does not make accommodations for DISTINCT, JOIN, etc.
as the ORM-level function does. Core should not be
attempting to provide a function like this.
Change-Id: I9916fc51ef744389a92c54660ab08e9695b8afc2
Fixes: #3724
|
|/
|
|
|
|
|
|
|
| |
The CTE construct was missing a _copy_internals() method
which would handle CTE-specific structures including _cte_alias,
_restates during a clone operation.
Change-Id: I9aeac9cd24d8f7ae6b70e52650d61f7c96cb6d7e
Fixes: #3722
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also adds version detection so that DROP INDEX CONCURRENTLY
only renders if the Postgresql version is 9.2 or higher;
for CREATE INDEX CONCURRENTLY, version detection is added
to allow the phrase to omit if the Postgresql version is
less than 8.2.
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I597287e0ebbbe256c957a3579b58ace6848ab4f4
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/84
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Fixes: #3588
Change-Id: Ifbfcab67375f289ddb5c4522f4b803cb8b7c34de
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/250
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The scalar object set() method calls upon the lazy loader
to get at the "old" value of the attriute, however doesn't
ensure that the "committed" value of the foreign key attributes
is used. If the user has manipulated these attributes and they
themselves have pending, non committed changes, we get the
"new" value which these attributes would have set up if they
were flushed. "old" vs "new" value is always about how the
value has changed since the load, so we always have to use the
DB-persisted values for everything when looking for "old".
Change-Id: I82bdc40ad0cf033c3a98f3361776cf3161542cd6
Fixes: #3708
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Adds ``key_share=True`` for with_for_update().
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I74e0c3fcbc023e1dc98a1fa0c7db67b4c3693a31
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/279
|
|/
|
|
|
|
|
| |
Fixes: #3049
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Ie572095c3e25f70a1e72e1af6858e5edd89fd25e
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/264
|