summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* spelling: Mysql -> MySQLpr/311Ville Skyttä2016-10-082-3/+3
|
* spelling: Postgis -> PostGISVille Skyttä2016-10-083-5/+5
|
* spelling: Postgresql -> PostgreSQLVille Skyttä2016-10-0860-311/+311
|
* Spelling fixesVille Skyttä2016-10-0823-30/+30
|
* - 1.1.1rel_1_1_1Mike Bayer2016-10-072-2/+3
|
* Change autoincrement compileerror to a warningMike Bayer2016-10-077-96/+155
| | | | | | | | Users are complaining that IntegrityError is no longer raised. Change-Id: I0855d5b7a98d4338f0910501b6e6d404ba33634d Fixes: #3216
* Catch DBAPIError instead of ProgrammingError for pyodbc failMike Bayer2016-10-072-2/+14
| | | | | Change-Id: Ide9e916d02fbbef549aa2838d1402c2b091e701d Fixes: #3820
* - set up for 1.1.1Mike Bayer2016-10-052-1/+4
| | | | Change-Id: I569a03a6e86aa096be6744ecb479fe8485f7def6
* - 1.1.0rel_1_1_0Mike Bayer2016-10-052-2/+3
|
* Merge "Propagate execution_options at compile stage"mike bayer2016-10-055-3/+69
|\
| * Propagate execution_options at compile stageMike Bayer2016-10-055-3/+69
| | | | | | | | | | | | | | | | Compiler can now set up execution options and additionally will propagate autocommit from embedded CTEs. Change-Id: I19db7b8fe4d84549ea95342e8d2040189fed1bbe Fixes: #3805
* | Minor grammatical improvements in doc/build/intro.rst.pr/310Randy Barlow2016-10-051-5/+5
|/
* Check for __clause_element__() in ORM insert/updateMike Bayer2016-10-056-7/+54
| | | | | | | | | | | | | | | | ORM attributes can now be assigned any object that is has a ``__clause_element__()`` attribute, which will result in inline SQL the way any :class:`.ClauseElement` class does. This covers other mapped attributes not otherwise transformed by further expression constructs. As part of this, it was considered that we could add __clause_element__() to ClauseElement, however this causes endless loops in a "while" pattern and this pattern has been identified in third party libraries. Add a test to ensure we never make that change. Change-Id: I9e15b3f1c4883fd3909acbf7dc81d034c6e3ce1d Fixes: #3802
* Check row for None with implicit returning PK to accommodate ON CONFLICTMike Bayer2016-10-043-13/+111
| | | | | | | | | | An adjustment to ON CONFLICT such that the "inserted_primary_key" logic is able to accommodate the case where there's no INSERT or UPDATE and there's no net change. The value comes out as None in this case, rather than failing on an exception. Change-Id: I0794e95c3ca262cb1ab2387167d96b8984225fce Fixes: #3813
* Merge "Enhance "raise" strategy to include "raise_on_sql" option"mike bayer2016-10-0410-82/+171
|\
| * Enhance "raise" strategy to include "raise_on_sql" optionMike Bayer2016-10-0410-82/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "raise_on_sql" option differentiates from "raise" in that firing a lazy loader is OK as long as it does a simple get from identity map. Whereas "raise" is more useful for the case that objects are to be detached. As part of this, refactors the strategy initiation logic a bit so that a LoaderStrategy itself knows what "key" was used to create it, thus allowing variants of a single strategy based on what the "lazy" argument is. To achieve this we have to also get rid of _get_strategy_by_cls(). Everything here is internal with the one exception of an apparently undocumented, but not underscored, "strategy_class" key on relationship(). Though it's not clear what "strategy_class" accomplishes; at this point the strategy system is extensible using Property.strategy_for(). Fixes: #3812 Change-Id: I812ad878ea5cf764e15f6f71cb39eee78a645d88
* | Merge "Honor additional row coming in with value of None"mike bayer2016-10-043-14/+75
|\ \
| * | Honor additional row coming in with value of NoneMike Bayer2016-10-043-14/+75
| |/ | | | | | | | | | | | | | | | | | | | | The change in #3431 still checks that the instance() is non-None, deferring to other loading schemes if it is. These columns are dedicated towards the entity however, so if the value is None, we should set it. If it conflicts, we are detecting that in any case. Change-Id: I223768e2898e843f953e910da1f9564b137d95e4 Fixes: #3811
* | - add a few more changes and try to break some out intoMike Bayer2016-10-042-120/+158
| | | | | | | | | | | | ORM behavioral changes Change-Id: I633ff10907b60111d3d0de0970fd384be7931d00
* | - add a note to baked documentation indicating it is notMike Bayer2016-10-041-3/+6
| | | | | | | | | | | | | | | | really of general use. This extension is there only for those who really want it based on observed performance characteristics. Change-Id: I2f612f26fdef4ddbeb1158ab1b344fad7083b11c
* | Use schema_name() for SQL Server default schemaMike Bayer2016-10-042-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | Changed the query used to get "default schema name", from one that queries the database principals table to using the "schema_name()" function, as issues have been reported that the former system was unavailable on the Azure Data Warehouse edition. It is hoped that this will finally work across all SQL Server versions and authentication styles. Change-Id: Ic11bd4162c0d6a60432ae44876e86512703c1f81 Fixes: #3810
* | Use SQL Server SERVERPROPERTY for version info w/ pyodbcMike Bayer2016-10-044-13/+36
|/ | | | | | | | | Updated the server version info scheme for pyodbc to use SQL Server SERVERPROPERTY(), rather than relying upon pyodbc.SQL_DBMS_VER, which continues to be unreliable particularly with FreeTDS. Change-Id: I4ff49ae13c8ff51bd764980131d41c18d73d87ce Fixes: #3814
* Ensure strong ref to obj before calling persistent_to_deleted, othersMike Bayer2016-10-034-6/+95
| | | | | | | | | | | | Add checks in spots where state.obj() might be late-GC'ed before we get a chance to call the event. There may be more cases of these which we should address as they come up. The Session should always be maintaining strong refs to objects that have pending operations left on them, so for these cases we need to ensure that ref remains long enough for the event to be called. Change-Id: I1a7c7bc57130acc11f54ad55924af2e36ac75101 Fixes: #3808
* Add "eager_parenthesis" late-compilation rule, use w/ PG JSON/HSTOREMike Bayer2016-10-018-28/+118
| | | | | | | | | | | | Added compiler-level flags used by Postgresql to place additional parenthesis than would normally be generated by precedence rules around operations involving JSON, HSTORE indexing operators as well as within their operands since it has been observed that Postgresql's precedence rules for at least the HSTORE indexing operator is not consistent between 9.4 and 9.5. Fixes: #3806 Change-Id: I5899677b330595264543b055abd54f3c76bfabf2
* - some documentation hitsMike Bayer2016-10-014-10/+25
| | | | Change-Id: I468fe70168804b08cf0d5e8b57e235bca904b1ff
* Remove extra "return" statement in orm.ext.declared_attr.cascading examplesDmitry Bogun2016-10-013-20/+13
| | | | | | | Also improves some naming in the examples. Change-Id: I51e5b1d9a730885aed10e5e6ade2123f5e736359 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/306
* Escape literal string values passed to server_defaultMike Bayer2016-09-304-1/+66
| | | | | | | | | | | A string sent as a column default via the :paramref:`.Column.server_default` parameter is now escaped for quotes. This change is backwards compatible with code that may have been working around this previously. Change-Id: I341298a76cc67bc0a53df4ab51ab9379f2294cdd Fixes: #3809
* Enable include_table for ON CONFLICT whereclausesMike Bayer2016-09-283-8/+31
| | | | | | | | | Fixed issue in new PG "on conflict" construct where columns including those of the "excluded" namespace would not be table-qualified in the WHERE clauses in the statement. Change-Id: Idfefc93e7e7b0d84805e23d5436d822d606f6a0a Fixes: #3807
* 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