| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/
|
|
|
|
| |
Change-Id: Ib9a69e20420e1fda755f4533c5f90bc08ba11b48
References: #8879
References: #9101
|
|
|
|
|
|
|
|
|
|
| |
try to keep the wordiness down here, using sidebars
and topics for non-essential information. Sphinx seems
to read out attrs from under TYPE_CHECKING sections now
so link out the attrs in DeclarativeBase w/ docstrings,
not sure why we didn't think of this earlier. looks great
Change-Id: Ib2e07e3606185998561c2d77b2564fd3eddb4d75
|
|
|
|
| |
Change-Id: I20e7f8ad5800c2ce5cdc9645c4dbe66f53b8cdf8
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes to the annotations within the ``sqlalchemy.ext.hybrid`` extension for
more effective typing of user-defined methods. The typing now uses
:pep:`612` features, now supported by recent versions of Mypy, to maintain
argument signatures for :class:`.hybrid_method`. Return values for hybrid
methods are accepted as SQL expressions in contexts such as
:meth:`_sql.Select.where` while still supporting SQL methods.
Fixes: #9096
Change-Id: Id4e3a38ec50e415220dfc5f022281b11bb262469
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a new parameter to :class:`_orm.Mapper` called
:paramref:`_orm.Mapper.polymorphic_abstract`. The purpose of this directive
is so that the ORM will not consider the class to be instantiated or loaded
directly, only subclasses. The actual effect is that the
:class:`_orm.Mapper` will prevent direct instantiation of instances
of the class and will expect that the class does not have a distinct
polymorphic identity configured.
In practice, the class that is mapped with
:paramref:`_orm.Mapper.polymorphic_abstract` can be used as the target of a
:func:`_orm.relationship` as well as be used in queries; subclasses must of
course include polymorphic identities in their mappings.
The new parameter is automatically applied to classes that subclass
the :class:`.AbstractConcreteBase` class, as this class is not intended
to be instantiated.
Additionally, updated some areas of the single table inheritance
documentation to include mapped_column(nullable=False) for all
subclass-only columns; the mappings as given didn't work as the
columns were no longer nullable using Annotated Declarative Table
style.
Fixes: #9060
Change-Id: Ief0278e3945a33a6ff38ac14d39c38ce24910d7f
|
|
|
|
| |
Change-Id: I273459175a3c55290b1f6c28f656ed9c4db17ccf
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Closes: #9028
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9028
Pull-request-sha: e2f8ddeac0b08feaad917285e988acf1e9465a26
Change-Id: I5caad31bfeeed2d224657a55f067ba1d86b8733f
|
| |
| |
| |
| | |
Change-Id: Id6cdaddad83aa93508e256e54010a6c53218b717
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: Ic6dda7f32a7561a0c0a92b8a7c08e44cb174eec1
|
|/
|
|
|
|
| |
Follow up of I07b72e6620bb64e329d6b641afa27631e91c4f16
Change-Id: I1f61974bf9cdc3da5317e546d4f9b649c2029e4d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
test related to #8064, added after discussion #9091 which
requested this behavior for with_loader_criteria() where it was
found to be working as of this issue, just not tested
Change-Id: I703f25af3708e49380b6004badd3a8ffb783ef70
References: #8064
References: #9091
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This decorator is no longer necessary as of Mypy
0.981 [1].
In current mypy versions, we require direct use of
`@property` for return types of these methods to be
recognized
[1] https://github.com/python/mypy/issues/1362
Change-Id: Ibc36083dec854c5f9140a9b621e9bf9d5bb4fb61
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added support for the Oracle SQL type ``TIMESTAMP WITH LOCAL TIME ZONE``,
using a newly added Oracle-specific :class:`_oracle.TIMESTAMP` datatype.
Fixes: #9086
Change-Id: Ib14119503a8aaf20e1aa4e36be80ccca37383e90
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
change {opensql} to {printsql} in prints, add missing markers
Change-Id: I07b72e6620bb64e329d6b641afa27631e91c4f16
|
| |/
|/|
| |
| |
| | |
Fixes: #9084
Change-Id: I5e174c318a20b7fcb5ea7c771293c5102e761ed7
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug / regression where using :func:`.bindparam()` with the same name
as a column in the :meth:`.Update.values` method of :class:`.Update`, as
well as the :meth:`.Insert.values` method of :class:`.Insert` in 2.0 only,
would in some cases silently fail to honor the SQL expression in which the
parameter were presented, replacing the expression with a new parameter of
the same name and discarding any other elements of the SQL expression, such
as SQL functions, etc. The specific case would be statements that were
constructed against ORM entities rather than plain :class:`.Table`
instances, but would occur if the statement were invoked with a
:class:`.Session` or a :class:`.Connection`.
:class:`.Update` part of the issue was present in both 2.0 and 1.4 and is
backported to 1.4.
Fixes: #9075
Change-Id: Ie954bc1f492ec6a566163588182ef4910c7ee452
|
| |
|
| |
|
|
|
|
| |
Change-Id: I20e196f63c8cea9cd805501ab174cab320575b05
|
|
|
|
| |
Change-Id: I954818fdf9f5b56a895dbfdaf191c4c5867b574f
|
|
|
|
| |
Change-Id: I0a7bd45121e7234ba6f0ebca9635beb142f43a3f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
type annotation somehow decided that TableClause doesn't have
primary key fields which is not the case at all. In particular
the "views" recipe relies on TableClause so adding a restriction
like this does not make any sense.
It seems the issue was to open this up for typing, by allowing
TableClause out as far as ddl.sort_tables() typing is passing
for now. Support it out in get_bind() etc.
Fixes: #9071
Change-Id: If0e22e0e7df7bee0ff4b295b0ffacfbc6b7a0142
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Supported use case for foreign key constraints where the local column is
marked as "invisible". The errors normally generated when a
:class:`.ForeignKeyConstraint` is created that check for the target column
are disabled when reflecting, and the constraint is skipped with a warning
in the same way which already occurs for an :class:`.Index` with a similar
issue.
tests are added for indexes, unique constraints, and primary key
constraints, which were already working; indexes and uniques warn,
primary keys don't which we would assume is because we never see those
PK columns in the first place.
Constraints now raise an informative ConstraintColumnNotFoundError
in the general case for strings in the "pending colargs" collection
not being resolvable.
Fixes: #9059
Change-Id: I400cf0bff6abba0e0c75f38b07617be1a8ec3453
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
this UPDATE refers to the unit of work's need to consider this
additional UPDATE as a dependency and not an actual UPDATE statement.
Change-Id: I2a520af21ebf96b45c431efa898d4e7683a5bc2d
References: #9066
References: #1063
|
|\ \ \
| | | |
| | | |
| | | | |
into main
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes #7147.
Closes: #9038
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9038
Pull-request-sha: 8647aaf2d9f48c55c152673828deb8ed54966a11
Change-Id: Id2f611ed8080a2837c70d2ea4b41abc46d2bb026
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
The Data Class Transforms argument ``field_descriptors`` was renamed
to ``field_specifiers`` in the accepted version of PEP 681.
Fixes: #9067
Change-Id: Ic13ea93c157325c3b60e65f328a364da68ea1c46
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Restored the behavior of :meth:`.Inspector.has_table` to report on
temporary tables for MySQL / MariaDB. This is currently the behavior for
all other included dialects, but was removed for MySQL in 1.4 due to no
longer using the DESCRIBE command; there was no documented support for temp
tables being reported by the :meth:`.Inspector.has_table` method in this
version or on any previous version, so the previous behavior was undefined.
As SQLAlchemy 2.0 has added formal support for temp table status via
:meth:`.Inspector.has_table`, the MySQL /MariaDB dialect has been reverted
to use the "DESCRIBE" statement as it did in the SQLAlchemy 1.3 series and
previously, and test support is added to include MySQL / MariaDB for
this behavior. The previous issues with ROLLBACK being emitted which
1.4 sought to improve upon don't apply in SQLAlchemy 2.0 due to
simplifications in how :class:`.Connection` handles transactions.
DESCRIBE is necessary as MariaDB in particular has no consistently
available public information schema of any kind in order to report on temp
tables other than DESCRIBE/SHOW COLUMNS, which rely on throwing an error
in order to report no results.
Fixes: #9058
Change-Id: Ic511bd5989ec17beb37b7cddd913732b626af0e6
|
|\ \
| | |
| | |
| | | |
reflection" into main
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added support to MySQL index reflection to correctly reflect the
``mysql_length`` dictionary, which previously was being ignored.
Fixes: #9047
Change-Id: I0a5e27123be68741e12af4464a0fa305052ec36e
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added support to the asyncpg dialect to return the ``cursor.rowcount``
value for SELECT statements when available. While this is not a typical use
for ``cursor.rowcount``, the other PostgreSQL dialects generally provide
this value. Pull request courtesy Michael Gorven.
Fixes: #9048
Closes: #9049
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9049
Pull-request-sha: df16160530c6001d99de059995ad5047a75fb7b0
Change-Id: I095b866779ccea7e4d50bc841fef7605e61c667f
|
|/
|
|
| |
Change-Id: Iaa0c160e3f8285f1ca989dcb12b86de15ea82f03
|
|
|
|
|
|
|
|
|
|
|
| |
updates for Insert / bulk insert, executemanyvalues,
as well as beginning to describe Table / declared class more
closely together, mentioning typing support.
Fixed a long-standing issue where sphinx would complain about
the Insert symbol being ambiguous.
Change-Id: Id4cc09b9581e8fa39c9c00bc8f229636e626e9bc
|
| |
|
| |
|
|
|
|
|
| |
Change-Id: I19c7d9683218d2c059aa36dd1743661e78974976
(cherry picked from commit 02bae22e6dbaa63ca689fa5c2925e89e56e3fc52)
|
|
|
|
|
| |
Change-Id: I69581c1563f15762a9a9afae4741e23fefd76906
(cherry picked from commit f26207c7307f3449e0235a264db0fcf5b089ff73)
|
|
|
|
| |
Change-Id: I625af65b3fb1815b1af17dc2ef47dd697fdc3fb1
|
|
|
|
| |
Change-Id: I5d8e4d7cb7871bedebe0fe89758be441e64b94c6
|
|
|
|
| |
Change-Id: I817dacc30143fd54126cd7fe92429af858605259
|