summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Pass schema_translate_map from DDLCompiler to SQLCompiler"mike bayer2020-08-073-1/+90
|\
| * Pass schema_translate_map from DDLCompiler to SQLCompilerMike Bayer2020-08-073-1/+90
| | | | | | | | | | | | | | | | | | | | | | | | Fixed issue where the :paramref:`_engine.Connection.execution_options.schema_translate_map` feature would not take effect when the :meth:`_schema.Sequence.next_value` function function for a :class:`_schema.Sequence` were used in the :paramref:`_schema.Column.server_default` parameter and the create table DDL were emitted. Fixes: #5500 Change-Id: I74a9fa13d22749d06c8202669f9ea220d9d984d9
* | Include bulk update/delete in RoutingSession exampleMike Bayer2020-08-071-2/+4
| | | | | | | | | | Fixes: #5407 Change-Id: Ia0965dbc88d744cded5c23021898388f2cf95f8d
* | base all_orm_descriptors ordering on cls.__dict__ + cls.__mro__Mike Bayer2020-08-065-6/+183
|/ | | | | | | | | | | | | Adjusted the workings of the :meth:`_orm.Mapper.all_orm_descriptors` accessor to represent the attributes in the order that they are located in a deterministic way, assuming the use of Python 3.6 or higher which maintains the sorting order of class attributes based on how they were declared. This sorting is not guaranteed to match the declared order of attributes in all cases however; see the method documentation for the exact scheme. Fixes: #5494 Change-Id: I6ee8d4ace3eb8b3f7c9c0f2a3d7e27b5f62abfd3
* revise asyncio verbiage a bitMike Bayer2020-08-061-10/+11
| | | | Change-Id: I8bdf7c3271b8284ab82e01558024f933e1ee7b49
* Merge "Documentation updates for 1.4"mike bayer2020-08-0635-950/+2240
|\
| * Documentation updates for 1.4Mike Bayer2020-08-0535-950/+2240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * major additions to 1.4 migration doc; removed additional verbosity regarding caching methodology and reorganized the doc to present itself more as a "what's changed" guide * as we now have a path for asyncio, update that doc so that we aren't spreading obsolete information * updates to the 2.0 migration guide with latest info, however this is still an architecture doc and not a migration guide yet, will need further rework. * start really talking about 1.x vs. 2.0 style everywhere. Querying is most of the docs so this is going to be a prominent theme, start getting it to fit in * Add introductory documentation for ORM example sections as these are too sparse * new documentation for do_orm_execute(), many separate sections, adding deprecation notes to before_compile() and similar * new example suites to illustrate do_orm_execute(), with_loader_criteria() * modernized horizontal sharding examples and added a separate example to distinguish between multiple databases and single database w/ multiple tables use case * introducing DEEP ALCHEMY, will use zzzeeksphinx 1.1.6 * no name for the alchemist yet however the dragon's name is Flambé Change-Id: Id6b5c03b1ce9ddb7b280f66792212a0ef0a1c541
* | Merge "Implement relationship AND criteria; global loader criteria"mike bayer2020-08-0623-100/+1731
|\ \ | |/
| * Implement relationship AND criteria; global loader criteriaMike Bayer2020-08-0523-100/+1731
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added the ability to add arbitrary criteria to the ON clause generated by a relationship attribute in a query, which applies to methods such as :meth:`_query.Query.join` as well as loader options like :func:`_orm.joinedload`. Additionally, a "global" version of the option allows limiting criteria to be applied to particular entities in a query globally. Documentation is minimal at this point, new examples will be coming in a subsequent commit. Some adjustments to execution options in how they are represented in the ORMExecuteState as well as well as a few ORM tests that forgot to get merged in a preceding commit. Fixes: #4472 Change-Id: I2b8fc57092dedf35ebd16f6343ad0f0d7d332beb
* | Merge "Fixes for MySQL 8"mike bayer2020-08-062-5/+19
|\ \ | |/ |/|
| * Fixes for MySQL 8Mike Bayer2020-08-052-5/+19
| | | | | | | | | | | | | | | | | | | | MySQL 8.0.19 has some changes to how it reports on display widths for int types (seems like it omits it in some cases), and also no longer cares about the length for YEAR. Another adjustment to the ordering of constraints reported in one case also. At least one CI machine is at 8.0.21 now. Change-Id: Ie2101bed3ad75dcbb62cd05abe95ef14ad895cf5
* | Convert lazy loader, selectinload, load_on_ident to lambda statementsMike Bayer2020-08-0523-1082/+532
|/ | | | | | | | | Building on newly robust lambdas in I29a513c98917b1d503abfdd61e6b6e8800851aa8, convert key loading off of the "baked" system so that baked is no longer used by the ORM. Change-Id: I3abfb45dd6e50f84f29d39434caa0b550ce27864
* Robustness for lambdas, lambda statementsMike Bayer2020-08-0515-343/+1520
| | | | | | | | | | | | | | | | | | | | in order to accommodate relationship loaders with lambda caching, a lot more is needed. This is a full refactor of the lambda system such that it now has two levels of caching; the first level caches what can be known from the __code__ element, then the next level of caching is against the lambda itself and the contents of __closure__. This allows for the elements inside the lambdas, like columns and entities, to change and then be part of the cache key. Lazy/selectinloads' use of baked queries had to add distinct cache key elements, which was attempted here but overall things needed to be more robust than that. This commit is broken out from the very long and sprawling commit at Id6b5c03b1ce9ddb7b280f66792212a0ef0a1c541 . Change-Id: I29a513c98917b1d503abfdd61e6b6e8800851aa8
* Add MariaDB 1927 to is_disconnect codesMike Bayer2020-08-053-0/+10
| | | | | | | | | Added MariaDB code 1927 to the list of "disconnect" codes, as recent MariaDB versions apparently use this code when the database server was stopped. Fixes: #5493 Change-Id: I63f1d692f36cb0411ead278556e3f8c64ab72ea4
* Merge "Establish future behavior for Session cascade backrefs, bind"mike bayer2020-08-0519-328/+689
|\
| * Establish future behavior for Session cascade backrefs, bindMike Bayer2020-08-0119-328/+689
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The behavior of the :paramref:`_orm.relationship.cascade_backrefs` flag will be reversed in 2.0 and set to ``False`` unconditionally, such that backrefs don't cascade save-update operations from a forwards-assignment to a backwards assignment. A 2.0 deprecation warning is emitted when the parameter is left at its default of ``True`` at the point at which such a cascade operation actually takes place. The new behavior can be established as always by setting the flag to ``False`` on a specific :func:`_orm.relationship`, or more generally can be set up across the board by setting the the :paramref:`_orm.Session.future` flag to True. Additionally in the interests of expediency, this commit will also move Session away from making use of bound metadata if the future=True flag is set. An application that sets future=True should ideally have to change as little else as possible for full 2.0 behavior. Fixes: #5150 Change-Id: I490d1d61f09c62ffc2de983208aeed25dfe48aec
* | fix formattingMike Bayer2020-08-041-1/+1
| | | | | | | | Change-Id: I8315cfef6e5c4b87d64fc770998a1229cc690870
* | Add note that fast_executemany uses memoryMike Bayer2020-08-041-7/+11
| | | | | | | | | | | | | | | | Ideally this would be a per-execution option, or Pyodbc could perhaps run the data in chunks. Fixes: #5334 Change-Id: If4a11b312346b8e4c2b8cd38840b3a2ba56dec3b
* | Merge "Genericize str() for types"mike bayer2020-08-027-21/+82
|\ \
| * | Genericize str() for typesMike Bayer2020-08-017-21/+82
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Remove lookup logic that attempts to locate a dialect for a type, just use StrSQLTypeCompiler. Cleaned up the internal ``str()`` for datatypes so that all types produce a string representation without any dialect present, including that it works for third-party dialect types without that dialect being present. The string representation defaults to being the UPPERCASE name of that type with nothing else. Fixes: #4262 Change-Id: I02149e8a1ba1e7336149e962939b07ae0df83c6b
* | Merge "Unpin pydocstyle, minimum for flake8-docstrings 1.3.1"mike bayer2020-08-022-5/+8
|\ \
| * | Unpin pydocstyle, minimum for flake8-docstrings 1.3.1Mike Bayer2020-07-292-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | Per https://gitlab.com/pycqa/flake8-docstrings/-/issues/36#note_199635329 flake8-docstrings has repaired the pydocstyle issue as of 1.3.1, so unpin pydocstyle. Change-Id: I117a5df58ff6c5a4087c433ab817ad305df6a17b
* | | Merge "Improve github action workflows"mike bayer2020-08-023-20/+21
|\ \ \
| * | | Improve github action workflowsFederico Caselli2020-07-273-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - in create wheel set minimum versions of setuptools and wheel to avoid failure in python 3.5 with metadata configured in setup.cfg - update action versions - test also cext in the pull requests Change-Id: Iaa5e4e4000c7faa688b51f2f41428c7dd7cae9c3
* | | | Clean python UUID importsVlastimil Zíma2020-07-304-31/+3
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #5482 All supported python versions provide 'uuid' module. Closes: #5483 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5483 Pull-request-sha: fc32498a8b639ff21d5898100592782826d2c6dd Change-Id: I8b41b811da7576f724353425dad5d6f581641b4b
* | | Merge "Consider default FROM DUAL for MySQL"mike bayer2020-07-293-1/+70
|\ \ \
| * | | Consider default FROM DUAL for MySQLMike Bayer2020-07-293-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MySQL claims it doesn't require FROM DUAL for no FROM clause even though the issue at #5481 locates a case which requires one. See if FROM DUAL the same way as Oracle without attempting to guess is potentially feasible. Fixes: #5481 Change-Id: I2a28876c10a8ce2d121cd344dcdd837db321d4ab
* | | | Merge "Imply `sync_backref` flag in a viewonly relationship"mike bayer2020-07-294-82/+112
|\ \ \ \ | |_|_|/ |/| | |
| * | | Imply `sync_backref` flag in a viewonly relationshipFederico Caselli2020-07-074-82/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update :paramref:`_orm.relationship.sync_backref` flag in a relationship to make it implicitly set to False in ``viewonly=True`` relationships, preventing synchronization events in all cases. References: #5237 Change-Id: Ib02b228a1b6e66b5ffd4540af776ac8f759c9a48
* | | | Passive deletes editsMike Bayer2020-07-291-63/+71
| | | | | | | | | | | | | | | | Change-Id: I863df033cae9bda4ce96d446a92984ae82797565
* | | | Remove errant linkMike Bayer2020-07-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The link to "passive_deletes" has moved in 9e1ee412b8650761af6df993e119906682604728 however the tag stayed here and caused a self link. Fixes: #5484 Change-Id: I3ac5970be30504367294b9e9a83eb5a2c579cc71
* | | | Merge "Ensure is_comparison passed for PG RANGE op() methods"mike bayer2020-07-293-23/+71
|\ \ \ \ | |_|_|/ |/| | |
| * | | Ensure is_comparison passed for PG RANGE op() methodsJim Bosch2020-07-263-23/+71
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue where the return type for the various RANGE comparison operators would itself be the same RANGE type rather than BOOLEAN, which would cause an undesirable result in the case that a :class:`.TypeDecorator` that defined result-processing behavior were in use. Pull request courtesy Jim Bosch. Fixes: #5476 Closes: #5477 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5477 Pull-request-sha: 925b117e0c91cdd67d9ddbd9d65f5ca3e88af91f Change-Id: I52ab4d4362d379c8253990f9d328a40990a64520
* | | Merge "Remove comment code lines"mike bayer2020-07-261-3/+0
|\ \ \ | |/ / |/| |
| * | Remove comment code linesj003562872020-07-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PyODBCConnector.initialize just super from Connector, no need to redeclare, so I guess that's why they are commented before. <!-- Provide a general summary of your proposed changes in the Title field above --> ### Description <!-- Describe your changes in detail --> Remove the useless comment code lines. ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: - [x] A documentation / typographical error fix - Good to go, no issue or tests are needed - [ ] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. **Have a nice day!** Closes: #5475 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5475 Pull-request-sha: 23176a7f0316d74407492c2bb299c88924ed0868 Change-Id: If94bb6275c30015e3aaa1519471b7d9bcda18bf8
* | | Improve delete cascade and passive deletes sectionsMike Bayer2020-07-264-95/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add cross linking from Core to ORM and also add new sections and examples regarding many-to-many. Move the section out of "collections" and into the "cascades" chapter where it's more likely to be found. Change-Id: If29360e463e5745279bc5335bd12352d50ad8953
* | | Update docs with actual MariaDB JSON supportDefteZ2020-07-261-2/+2
|/ /
* | Merge "Revise setinputsizes approach"mike bayer2020-07-233-60/+154
|\ \
| * | Revise setinputsizes approachMike Bayer2020-07-193-60/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in order to support asyncpg as well as pg8000, we need to revise setinputsizes to work for more cases as well as adjust NativeForEmulated a bit to work more completely with the INTERVAL datatype. - put most of the setinputsizes work into the compiler where the computation can be cached. - support per-element setinputsizes for a tuple - adjust TypeDecorator so that _unwrapped_dialect_impl will honor a type that the dialect links to directly in it's adaption mapping. Decouble _unwrapped_dialect_impl from TypeDecorator._gen_dialect_impl() which has a different purpose. This allows setinputsizes to do the right thing with the INTERVAL datatype. - test cases for Oracle with Variant continue to work Change-Id: I9e1ea33aeca3b92b365daa4a356d778191070c03
* | | Merge "Allow Grouping to pass along proxy_set of element"mike bayer2020-07-233-0/+36
|\ \ \
| * | | Allow Grouping to pass along proxy_set of elementMike Bayer2020-07-213-0/+36
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Repaired an issue where the "ORDER BY" clause rendering a label name rather than a complete expression, which is particularly important for SQL Server, would fail to occur if the expression were enclosed in a parenthesized grouping in some cases. This case has been added to test support. Fixes: #5470 Change-Id: Ie0e27c39e5d53be78b32f7810f93d2d0536375e7
* | | Ensure _distinct_on removed within from_selectableMike Bayer2020-07-202-0/+95
|/ / | | | | | | | | Fixes: #5469 Change-Id: I85498d3380c2efb595782d2ba92cfd692c3efc48
* | Fix mssql dialect escaping object names containing ']'Gord Thompson2020-07-183-4/+26
| | | | | | | | | | Fixes: #5467 Change-Id: I054ec219717ba62847a9daf1214e215dd6b70633
* | Merge "Add requirement for test_get_view_definition"mike bayer2020-07-161-0/+1
|\ \
| * | Add requirement for test_get_view_definitionGord Thompson2020-07-151-0/+1
| | | | | | | | | | | | | | | | | | Bypass the test if the views are not being created. Change-Id: I3945acb418575d12e5fe0e4657eb5e3b1c08b90e
* | | Repair test modified in 5de0f1cf50cc0170d8eMike Bayer2020-07-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | was "failing" for SQL server since a second set of assertions had been removed, these can be back as long as the session is rolled back afterwards Change-Id: Ie5d75aea41ba98f549cd72d71c6b4fdb30726775
* | | Repair doubled "using engines in fork()" sectionMike Bayer2020-07-152-97/+59
|/ / | | | | | | | | | | | | | | | | This section was written twice in two different ways with the same recipe. consolidate into one section and add additional caveats regading dispose. Change-Id: I20524935e7c10e3624d561ea2735312fd04e673d References: #5460
* | Merge "test single and double quote inspection scenarios"2020_tutorialmike bayer2020-07-136-20/+185
|\ \
| * | test single and double quote inspection scenariosMike Bayer2020-07-136-20/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applied a sweep through all included dialects to ensure names that contain single or double quotes are properly escaped when querying system tables, for all :class:`.Inspector` methods that accept object names as an argument (e.g. table names, view names, etc). SQLite and MSSQL contained two quoting issues that were repaired. Fixes: #5456 Change-Id: I3bc98806f5166f3d82275650079ff561446f2aef
* | | Merge "more docs for autocommit isolation level"mike bayer2020-07-1310-81/+232
|\ \ \