summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | apply changelog note for change of column loader optionsMike Bayer2023-01-163-3/+240
|/ | | | | | Change-Id: Ib9a69e20420e1fda755f4533c5f90bc08ba11b48 References: #8879 References: #9101
* super-fine pass through the metadata tutorialMike Bayer2023-01-154-135/+270
| | | | | | | | | | 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
* fix orm-header for standaloneMike Bayer2023-01-151-1/+1
| | | | Change-Id: I20e7f8ad5800c2ce5cdc9645c4dbe66f53b8cdf8
* apply pep-612 to hybrid_method; accept SQLCoreOperationsMike Bayer2023-01-144-10/+63
| | | | | | | | | | | | 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
* implement polymorphic_abstract=True featureMike Bayer2023-01-149-41/+526
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix typoMike Bayer2023-01-131-1/+1
| | | | Change-Id: I273459175a3c55290b1f6c28f656ed9c4db17ccf
* Merge "Type annotations for sqlalchemy.sql.selectable" into mainmike bayer2023-01-137-108/+224
|\
| * Type annotations for sqlalchemy.sql.selectableDzmitar2023-01-137-108/+224
| | | | | | | | | | | | | | | | | | 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
* | Make the custom type map more discoverableFederico Caselli2023-01-134-24/+63
| | | | | | | | Change-Id: Id6cdaddad83aa93508e256e54010a6c53218b717
* | Merge "Remove old file and missing doc section" into mainmike bayer2023-01-132-479/+0
|\ \
| * | Remove old file and missing doc sectionFederico Caselli2023-01-122-479/+0
| |/ | | | | | | Change-Id: Ic6dda7f32a7561a0c0a92b8a7c08e44cb174eec1
* | Fixes related to improved sql formattingFederico Caselli2023-01-1231-300/+584
|/ | | | | | Follow up of I07b72e6620bb64e329d6b641afa27631e91c4f16 Change-Id: I1f61974bf9cdc3da5317e546d4f9b649c2029e4d
* Merge "add with_loader_criteria() test for #8064 / #9091" into mainmike bayer2023-01-121-0/+62
|\
| * add with_loader_criteria() test for #8064 / #9091Mike Bayer2023-01-121-0/+62
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "replace @decorated_property decorator" into mainmike bayer2023-01-127-57/+16
|\ \
| * | replace @decorated_property decoratorMike Bayer2023-01-127-57/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Support local timespamp support on Oracle" into mainmike bayer2023-01-125-4/+49
|\ \ \ | |/ / |/| |
| * | Support local timespamp support on OracleFederico Caselli2023-01-125-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Improve sql formatting" into mainmike bayer2023-01-1257-489/+483
|\ \ \
| * | | Improve sql formattingFederico Caselli2023-01-1157-489/+483
| | |/ | |/| | | | | | | | | | | | | change {opensql} to {printsql} in prints, add missing markers Change-Id: I07b72e6620bb64e329d6b641afa27631e91c4f16
* | | Move docs in mysql dbapiFederico Caselli2023-01-112-14/+13
| |/ |/| | | | | | | Fixes: #9084 Change-Id: I5e174c318a20b7fcb5ea7c771293c5102e761ed7
* | fix ORM support for column-named bindparam() in crud .values()Mike Bayer2023-01-116-5/+239
|/ | | | | | | | | | | | | | | | | | | 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
* Version 2.0.0rc3 placeholderMike Bayer2023-01-092-1/+5
|
* - 2.0.0rc2rel_2_0_0rc2Mike Bayer2023-01-097-60/+65
|
* remove anchor removed by mistakeMike Bayer2023-01-091-0/+2
| | | | Change-Id: I20e196f63c8cea9cd805501ab174cab320575b05
* fix inconsistent title levelMike Bayer2023-01-091-1/+1
| | | | Change-Id: I954818fdf9f5b56a895dbfdaf191c4c5867b574f
* ensure this is called 2.0.0rc2 in changelogsMike Bayer2023-01-092-2/+2
| | | | Change-Id: I0a7bd45121e7234ba6f0ebca9635beb142f43a3f
* Merge "accept TableClause through mapped selectable chain" into mainmike bayer2023-01-096-38/+89
|\
| * accept TableClause through mapped selectable chainMike Bayer2023-01-096-38/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "warn and skip for FKs that refer to invisible cols for Oracle" into mainFederico Caselli2023-01-097-35/+217
|\ \
| * | warn and skip for FKs that refer to invisible cols for OracleMike Bayer2023-01-097-35/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | remove misleading line in post_updateMike Bayer2023-01-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Implement missing `#-`, `@?` and `@@` Postgres' JSONB operators." ↵mike bayer2023-01-093-1/+106
|\ \ \ | | | | | | | | | | | | into main
| * | | Implement missing `#-`, `@?` and `@@` Postgres' JSONB operators.Guilherme Martins Crocetti2023-01-053-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #7147. Closes: #9038 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9038 Pull-request-sha: 8647aaf2d9f48c55c152673828deb8ed54966a11 Change-Id: Id2f611ed8080a2837c70d2ea4b41abc46d2bb026
* | | | Use field_specifiers instead of deprecated field_descriptorsFederico Caselli2023-01-082-2/+8
| |_|/ |/| | | | | | | | | | | | | | | | | | | | The Data Class Transforms argument ``field_descriptors`` was renamed to ``field_specifiers`` in the accepted version of PEP 681. Fixes: #9067 Change-Id: Ic13ea93c157325c3b60e65f328a364da68ea1c46
* | | Merge "revert MySQL to use DESCRIBE for has_table()" into mainmike bayer2023-01-055-32/+73
|\ \ \ | |_|/ |/| |
| * | revert MySQL to use DESCRIBE for has_table()Mike Bayer2023-01-055-32/+73
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "include parsed col length field as integer from mysql index ↵mike bayer2023-01-054-3/+110
|\ \ | | | | | | | | | reflection" into main
| * | include parsed col length field as integer from mysql index reflectionMike Bayer2023-01-044-3/+110
| | | | | | | | | | | | | | | | | | | | | | | | Added support to MySQL index reflection to correctly reflect the ``mysql_length`` dictionary, which previously was being ignored. Fixes: #9047 Change-Id: I0a5e27123be68741e12af4464a0fa305052ec36e
* | | Merge "[asyncpg] Extract rowcount for SELECT statements" into mainmike bayer2023-01-053-1/+15
|\ \ \ | |_|/ |/| |
| * | [asyncpg] Extract rowcount for SELECT statementsMichael Gorven2023-01-043-1/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | more thoughts on tutorial presentation of ORM /CoreMike Bayer2023-01-044-47/+82
|/ | | | Change-Id: Iaa0c160e3f8285f1ca989dcb12b86de15ea82f03
* tutorial updates re: Core /ORM commonalityMike Bayer2023-01-034-35/+37
| | | | | | | | | | | 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
* cherry-pick changelog update for 1.4.47Mike Bayer2023-01-031-0/+4
|
* cherry-pick changelog from 1.4.46Mike Bayer2023-01-0313-139/+151
|
* update wordingMike Bayer2023-01-031-1/+4
| | | | | Change-Id: I19c7d9683218d2c059aa36dd1743661e78974976 (cherry picked from commit 02bae22e6dbaa63ca689fa5c2925e89e56e3fc52)
* changelog updatesMike Bayer2023-01-032-7/+24
| | | | | Change-Id: I69581c1563f15762a9a9afae4741e23fefd76906 (cherry picked from commit f26207c7307f3449e0235a264db0fcf5b089ff73)
* happy new year 2023Mike Bayer2023-01-03208-208/+208
| | | | Change-Id: I625af65b3fb1815b1af17dc2ef47dd697fdc3fb1
* link to with_variant() narrative from API docMike Bayer2023-01-032-0/+7
| | | | Change-Id: I5d8e4d7cb7871bedebe0fe89758be441e64b94c6
* exclude pk update tests for mssqlMike Bayer2022-12-291-1/+11
| | | | Change-Id: I817dacc30143fd54126cd7fe92429af858605259