summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* orm.ext.declared_attr.cascading have incorrect example in docstringpr/306Dmitry Bogun2016-09-273-21/+18
| | | | | There is an error in code example in docstring for declared_attr.cascading.
* Merge "Handle BaseException in all _handle_dbapi_error"mike bayer2016-09-268-33/+223
|\
| * Handle BaseException in all _handle_dbapi_errorMike Bayer2016-09-218-33/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests illustrate that exceptions like GreenletExit and even KeyboardInterrupt can corrupt the state of a DBAPI connection like that of pymysql and mysqlclient. Intercept BaseException errors within the handle_error scheme and invalidate just the connection alone in this case, but not the whole pool. The change is backwards-incompatible with a program that currently intercepts ctrl-C within a database transaction and wants to continue working on that transaction. Ensure the event hook can be used to reverse this behavior. Change-Id: Ifaa013c13826d123eef34e32b7e79fff74f1b21b Fixes: #3803
* | - improve documentation for SessionTransaction re: parentMike Bayer2016-09-242-10/+111
| | | | | | | | | | | | | | | | | | | | and nested attributes and what these mean - improve linking for after_transaction_create() / after_transaction_end() events - add public .parent attribute to detect top-level transaction within these events Change-Id: Ie7382bc8fe5de226160dcb6a5019e19fcc5af38e
* | - clarify documentation on timezone flag, since Oracle has bothMike Bayer2016-09-222-5/+37
| | | | | | | | | | | | | | DATE / TIMESTAMP separately the timezone flag will not bump the type to TIMESTAMP WITH TIMEZONE on that backend. Change-Id: I185992093472e1620b8cf84872631a4d48f8edc3
* | Ensure mapper.polymorphic_on is polymorphic_prop.columns[0]Mike Bayer2016-09-213-12/+93
|/ | | | | | | | | Fixed bug where joined eager loading would fail for a polymorphically- loaded mapper, where the polymorphic_on was set to an un-mapped expression such as a CASE expression. Change-Id: Iffe68196aaac592165c89684f09f4c06cd78ce54 Fixes: #3800
* Merge "Add exclude_tablespaces argument to Oracle"mike bayer2016-09-202-12/+82
|\
| * Add exclude_tablespaces argument to OracleDavid Fraser2016-09-202-12/+82
| | | | | | | | | | | | | | | | | | Allows the SYSTEM and SYSAUX tablespaces to be only conditionally omitted when doing get_table_names() and get_temp_table_names(). Change-Id: Ie6995873f05163f2ce473a6a9c2d958a30681b44 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/292
* | Merge "Add the "triggering mapper" to the configure_mappers error message."mike bayer2016-09-204-9/+21
|\ \ | |/ |/|
| * Add the "triggering mapper" to the configure_mappers error message.John Perkins2016-09-204-9/+21
| | | | | | | | | | | | | | | | | | | | There are cases where the originating mapper name is not present in the exception message, such as relationship initialization against an unmapped class. Ensure the originating mapper is named in the string output. Pull-request: https://github.com/zzzeek/sqlalchemy/pull/298 Change-Id: I9f23bfa90b26dde9229ab7ec812eec9ceae48153
* | - disable two phase testing for mysql entirely, build serversMike Bayer2016-09-201-2/+3
| | | | | | | | | | | | have no time to deal with MySQL 5.7's issues Change-Id: Ic5f4e5b0aff1b4b5210bc7b5da203f536561e585
* | Merge "Allow SQL expressions to be set on PK columns"mike bayer2016-09-204-9/+98
|\ \
| * | Allow SQL expressions to be set on PK columnsMike Bayer2016-09-204-9/+98
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Removes an unnecessary transfer of modified PK column value to the params dictionary, so that if the modified PK column is already present in value_params, this remains in effect. Also propagate a new flag through to _emit_update_statements() that will trip "return_defaults()" across the board if a PK col w/ SQL expression change is present, and pull this PK value in _postfetch as well assuming we're an UPDATE. Change-Id: I9ae87f964df9ba8faea8e25e96b8327f968e5d1b Fixes: #3801
* | Merge "Exclude eq and ne from associative operators"mike bayer2016-09-203-1/+19
|\ \
| * | Exclude eq and ne from associative operatorsJohn Passaro2016-09-193-1/+19
| |/ | | | | | | | | | | | | | | | | | | | | | | The "eq" and "ne" operators are no longer part of the list of "associative" operators, while they remain considered to be "commutative". This allows an expression like ``(x == y) == z`` to be maintained at the SQL level with parenthesis. Pull request courtesy John Passaro. Fixes: #3799 Change-Id: I3759d8987b35649d7418b6524316c9e70c857e68 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/308
* | Merge "Support bindparam() with callable for primaryjoin"mike bayer2016-09-205-5/+75
|\ \
| * | Support bindparam() with callable for primaryjoinMike Bayer2016-09-195-5/+75
| |/ | | | | | | | | | | | | | | | | | | | | Fixes the comparison of bindparam() objects based on the "callable" parameter being present which helps to correctly detect use_get, and also checks for "callable" when detecting parameters for value substitution and will not impact the object if present. Change-Id: I4c93ee5d404d2648dd9835beeae0c5fb67e37d19 Fixes: #3767
* | Merge "Fix ArgumentError access in Session._add_bind"mike bayer2016-09-193-6/+32
|\ \
| * | Fix ArgumentError access in Session._add_bindMike Bayer2016-09-193-6/+32
| |/ | | | | | | | | | | Fixes: #3798 Change-Id: Ib4e6344b599e871f9d46d36a5aeb7ba3104dc99b Pull-request: https://github.com/zzzeek/sqlalchemy/pull/293
* | Merge "Additions to support HAAlchemy plugin"mike bayer2016-09-1911-60/+232
|\ \ | |/ |/|
| * Additions to support HAAlchemy pluginMike Bayer2016-09-1611-60/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add a connect=True key to connection record to support pre-loading of _ConnectionRecord objects - ensure _ConnectionRecord.close() leaves the record in a good state for reopening - add _ConnectionRecord.record_info for persistent storage - add "in_use" accessor based on fairy_ref being present or not - allow for the exclusions system and SuiteRequirements to be usable without the full plugin_base setup. - move some Python-env requirements to the importable requirements.py module. - allow starttime to be queried - add additional events for engine plugins - have "dialect" be a first-class parameter to the pool, ensure the engine strategy supplies it up front Change-Id: Ibf549f7a1766e49d335cd6f5e26bacfaef9a8229
* | Add "message 20017" (unexpected EOF from the server) to mssql.Ken Robbins2016-09-192-0/+10
|/ | | | | | Fixes: #3791 Change-Id: I0dade4fe0ecbb53b4a66881594f362986ba73ae8 Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/89
* - latest mysql 5.7 also crashing on XA recovery, disableMike Bayer2016-09-162-5/+6
| | | | | | XA recovery for all MySQL Change-Id: I4f77de521cd80c09fdf97e5bbe5dfd1c830dc3cb
* Repair foreign_keys population for Join._refresh_for_new_columnMike Bayer2016-09-154-2/+100
| | | | | | | | | | Fixed bug where setting up a single-table inh subclass of a joined-table subclass which included an extra column would corrupt the foreign keys collection of the mapped table, thereby interfering with the initialization of relationships. Change-Id: I04a0cf98fd456d12d5a5b9e77a46a01246969a63 Fixes: #3797
* - placeholder for 1.0.16 within 1.0 changelogMike Bayer2016-09-151-0/+3
| | | | | Change-Id: I33405513dc216ad33c5ec4796bff73f75d5866c4 (cherry picked from commit 4017b2696498a1cb4804a3be32b522b542d5af90)
* Merge branch 'keeyipchan/fix-typo-in-comment-1473614966363' of ↵Mike Bayer2016-09-131-2/+2
|\ | | | | | | https://bitbucket.org/keeyipchan/sqlalchemy
| * Fix typo in commentkeeyip chan2016-09-111-2/+2
| |
* | - also caveats for update() / delete() regarding singleMike Bayer2016-09-121-0/+10
| | | | | | | | | | | | | | table inheritance Change-Id: If1511812a22a53537409f902f73e2e52ae3e4a3d (cherry picked from commit 992344334328dba385fe6aa7694cfe3c13adc9d6)
* | - add caveat for bulk deletes that they are generally not feasibleMike Bayer2016-09-121-0/+26
|/ | | | | | for joined inheritance Change-Id: I043a5842401d586aa3ff96d05e06b443ff03fa60
* Merge "Allow stringify compiler to render unnamed column"mike bayer2016-09-023-5/+28
|\
| * Allow stringify compiler to render unnamed columnMike Bayer2016-09-023-5/+28
| | | | | | | | | | | | | | | | | | | | Stringify of expression with unnamed :class:`.Column` objects, as occurs in lots of situations including ORM error reporting, will now render the name in string context as "<name unknown>" rather than raising a compile error. Change-Id: I76f637c5eb4cfdb1b526964cb001565b97e296da Fixes: #3789
* | Repair clauselist comparison to account for clause orderingMike Bayer2016-09-026-7/+186
|/ | | | | | | | | | | | | | | | Fixed bug where the "simple many-to-one" condition that allows lazy loading to use get() from identity map would fail to be invoked if the primaryjoin of the relationship had multiple clauses separated by AND which were not in the same order as that of the primary key columns being compared in each clause. This ordering difference occurs for a composite foreign key where the table-bound columns on the referencing side were not in the same order in the .c collection as the primary key columns on the referenced side....which in turn occurs a lot if one is using declarative mixins and/or declared_attr to set up columns. Change-Id: I66cce74f614c04ed693dc0d58ac8c952b2f8ae54 Fixes: #3788
* - add 1.0.15 release dateMike Bayer2016-09-011-0/+1
| | | | Change-Id: I5d3f74c002f9d4593940ab4d68a3b35f3f227597
* Support all MySQL/Connector int/bool argumentsMike Bayer2016-09-012-0/+25
| | | | | | | | | | | Added support for parsing MySQL/Connector boolean and integer arguments within the URL query string: connection_timeout, connect_timeout, pool_size, get_warnings, raise_on_warnings, raw, consume_results, ssl_verify_cert, force_ipv6, pool_reset_session, compress, allow_local_infile, use_pure. Change-Id: I2a1a17d13d47d56871bff32e94fdbed8bc003ad7 Fixes: #3787
* Check for supports_execution at ClauseElement baseMike Bayer2016-08-318-10/+58
| | | | | | | | | | Raise a more descriptive exception / message when ClauseElement or non-SQLAlchemy objects that are not "executable" are erroneously passed to ``.execute()``; a new exception ObjectNotExecutableError is raised consistently in all cases. Change-Id: I2dd393121e2c7e5b6b9e40286a2f25670876e8e4 Fixes: #3786
* Corrects typopr/305Edouard Berthe2016-08-311-2/+2
| | | | This example doesn't work with 'back_populates' because 'parent_associations' and 'child_associations' are not defined in Parent and Child classes respectively. Alternatively, we could create 'parent_associations' and 'child_associations' into the classes.
* Merge remote-tracking branch 'origin/pr/304'Mike Bayer2016-08-282-2/+20
|\
| * Provide more informative error when joining with no entitiespr/304Michael Williamson2016-08-282-2/+20
| |
* | Merge remote-tracking branch 'origin/pr/303'Mike Bayer2016-08-281-1/+1
|\ \
| * | Fix table reference in PostgreSQL documentationpr/303Michael Williamson2016-08-281-1/+1
| |/
* | Fixed example of upsert in the HasCTE.cte docstring bypr/302Vladimir Magamedov2016-08-271-18/+28
|/ | | | replacing it with more concrete and working example.
* Raise when two validators conflictMike Bayer2016-08-263-1/+54
| | | | | | | | Two @validates decorators that make use of the same name is not supported. Raise an exception. Change-Id: Ia3e89ffdc9ef345a0de258e2ac0ac5e0bd421c61 Fixes: #3776
* Merge "Add docstring to declarative_base"mike bayer2016-08-223-0/+23
|\
| * Add docstring to declarative_baseFrazer McLean2016-08-063-0/+23
| | | | | | | | | | Change-Id: I5ad44362515908592f1e8b1e6254a5270d43234a Pull-request: https://github.com/zzzeek/sqlalchemy/pull/295
* | - fix wrong var name, credit to @RazerMMike Bayer2016-08-171-1/+1
| | | | | | | | Change-Id: I36fbbfd1223ef5298c679f46db24e1bf3013cef0
* | Merge remote-tracking branch 'origin/pr/299'Mike Bayer2016-08-1620-32/+32
|\ \
| * | Spelling fixespr/299Ville Skyttä2016-08-0820-32/+32
| |/
* | Merge remote-tracking branch 'origin/pr/300'Mike Bayer2016-08-161-0/+1
|\ \
| * | Fix documentation basic example (missing imports)pr/300Romuald Brunet2016-08-111-0/+1
| |/
* | Rework _apply_joins(), _prep_for_joins() totallyMike Bayer2016-08-153-45/+209
| | | | | | | | | | | | | | | | | | | | | | | | The approach here is still error prone and hard to follow. Reorganize the whole thing to take a pretty blunt approach to the structure of to_join(). Also fix some never-called code (!) in _prep_for_joins() and ensure we re-use an aliased object. Fixes: #3774 Change-Id: Ie6319415ae7213b4a33eac2ab70803ad2880d340