summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
Commit message (Collapse)AuthorAgeFilesLines
* - allow for the exclusions system and SuiteRequirements to bepool_additionsMike Bayer2016-09-084-8/+56
| | | | | | | | usable without the full plugin_base setup. - move some Python-env requirements to the importable requirements.py module. Change-Id: I3bfffce75b53040f6923b89e0fa2140bec243bc8
* - add "in_use" accessor based on fairy_ref being present or notMike Bayer2016-09-081-0/+6
| | | | Change-Id: I12a84e00169e2a15582e814901ecd207066934c8
* - add _ConnectionRecord.record_info for persistent storageMike Bayer2016-09-021-0/+46
| | | | Change-Id: I55de02d9421a3da7b17e24de6fdcaf5daacbba4f
* - add a connect=True key to connection record to supportMike Bayer2016-09-021-2/+4
| | | | | | | | pre-loading of _ConnectionRecord objects - ensure _ConnectionRecord.close() leaves the record in a good state for reopening Change-Id: I4eeb8e29f643950afb9eaab94d815e2a115db3d6
* Merge "Allow stringify compiler to render unnamed column"mike bayer2016-09-021-3/+8
|\
| * Allow stringify compiler to render unnamed columnMike Bayer2016-09-021-3/+8
| | | | | | | | | | | | | | | | | | | | 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-023-6/+25
|/ | | | | | | | | | | | | | | | 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
* Support all MySQL/Connector int/bool argumentsMike Bayer2016-09-011-0/+14
| | | | | | | | | | | 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-316-10/+29
| | | | | | | | | | 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
* Merge remote-tracking branch 'origin/pr/304'Mike Bayer2016-08-281-2/+7
|\
| * Provide more informative error when joining with no entitiespr/304Michael Williamson2016-08-281-2/+7
| |
* | 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-261-0/+5
| | | | | | | | 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-221-0/+6
|\
| * Add docstring to declarative_baseFrazer McLean2016-08-061-0/+6
| | | | | | | | | | Change-Id: I5ad44362515908592f1e8b1e6254a5270d43234a Pull-request: https://github.com/zzzeek/sqlalchemy/pull/295
* | Merge remote-tracking branch 'origin/pr/299'Mike Bayer2016-08-166-7/+7
|\ \
| * | Spelling fixespr/299Ville Skyttä2016-08-086-7/+7
| |/
* | Rework _apply_joins(), _prep_for_joins() totallyMike Bayer2016-08-151-43/+47
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Ensure final link in subqueryload join is correctMike Bayer2016-08-121-1/+1
| | | | | | | | | | | | | | | | | | Fixed bug in subquery eager loading where a subqueryload of an "of_type()" object linked to a second subqueryload of a plain mapped class would fail to link the joins correctly. Change-Id: I4be89e6f5e492438464a2ded01eb9c84d7ff7d4e Fixes: #3773
* | - small updates to polymorphic eager loading, cross-link fromMike Bayer2016-08-111-5/+5
|/ | | | | | loading documentation Change-Id: I3ce7e2cc521c4dd155195819a919017d4cc63b3c
* Build string/int processors for JSONIndexType, JSONPathTypeMike Bayer2016-08-045-25/+109
| | | | | | | | | | | | Fixed regression in JSON datatypes where the "literal processor" for a JSON index value, that needs to take effect for example within DDL, would not be invoked for the value. The native String and Integer datatypes are now called upon from within the JSONIndexType and JSONPathType. This is applied to the generic, Postgresql, and MySQL JSON types. Change-Id: Ifa5f2acfeee57a79d01d7fc85d265a37bd27c716 Fixes: #3765
* Propagate kwargs to all MySQL CAST pathsMike Bayer2016-08-041-4/+4
| | | | | Change-Id: I23a6abb26bbbe3d118887d043ce761fc4572d8d2 Fixes: #3766
* Merge branch 'declarative-constructor-reference' of ↵Mike Bayer2016-08-021-1/+1
|\ | | | | | | https://bitbucket.org/michaelwilliamson/sqlalchemy
| * Fix reference to _declarative_constructor in docstringMichael Williamson2016-07-251-1/+1
| |
* | Ensure post-__clause_element__() expression are used in IndexMike Bayer2016-07-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | The change in Index for 1.1 combined with the fix for ref #3763 still fails to deliver the correct object resolved by __clause_element__() to the list of expressions for compilation. Make sure we use the expression that's been unwrapped from __clause_element__(). Change-Id: Ie1df8db5090de665048331786f0024d52851923f Fixes: #3763
* | Merge "Index should extract __clause_element__() early"mike bayer2016-07-301-1/+4
|\ \
| * | Index should extract __clause_element__() earlyMike Bayer2016-07-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where :class:`.Index` would fail to extract columns from compound SQL expressions if those SQL expressions were wrapped inside of an ORM-style ``__clause_element__()`` construct. This bug exists in 1.0.x as well, however in 1.1 is more noticeable as hybrid_property @expression now returns a wrapped element. Fixes: #3763 Change-Id: I992536386503a1fb3f2305790abe008d72c44c4a
* | | Clarify order_by(False)Mike Bayer2016-07-291-5/+4
|/ / | | | | | | | | | | | | | | It wasn't clear how this differs from order_by(None); add more tests and document that this has to do with whether or not mapper.order_by will be re-enabled as well. Change-Id: I332e8ac60c999b38c5a243f1cb72de3cf77891b6
* | Allow None to cancel Query.group_by()Iuri Diniz2016-07-291-1/+15
| | | | | | | | | | | | | | | | | | | | | | This replicates the same behavior as order_by(). order_by() will also be updated to deprecate passing of False as this is no longer functionally different than passing None. Change-Id: I2fc05d0317d28b6c83373769a48f7eea32d56290 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/297
* | - next release is 1.1.0Mike Bayer2016-07-291-1/+1
| | | | | | | | Change-Id: I1d8ac48e6457e80e93b925152f434c13139b3d94
* | - Document how SQL Server does MAX with VARCHAR, NVARCHARMike Bayer2016-07-271-0/+20
| | | | | | | | | | | | Fixes #3760 Change-Id: I0613eb66bfdc9d7118688c74e29c8da322c3b4db
* | Allow Table._reset_exported to silently passMike Bayer2016-07-242-2/+3
|/ | | | | | | | | | | Fixed bug in :class:`.Table` where the internal method ``_reset_exported()`` would corrupt the state of the object. This method is intended for selectable objects and is called by the ORM in some cases; an erroneous mapper configuration would could lead the ORM to call this on on a :class:`.Table` object. Change-Id: I63fa34ee0cdf16358bb125c556390df79758bcbc Fixes: #3755
* - MySQL's JSON shared implementation completely w/ sqltypes.JSON;Mike Bayer2016-07-242-38/+3
| | | | | | | | | | this must have been an oversight. Leave mysql.JSON in place still as we might need to add things to it. - CAST(json, String) still confusing MySQL drivers even mysqlclient. Since here we're checking for the raw form of the JSON and not a typical round trip, add a force for unicode Change-Id: I727f4526a01a0875037cf0dede45cd074da5205a
* Remove same-named relationship warningMike Bayer2016-07-191-11/+0
| | | | | | | | | | Removed a warning that dates back to 0.4 which emits when a same-named relationship is placed on two mappers that inherits via joined or single table inheritance. The warning does not apply to the current unit of work implementation. Change-Id: If528ec3a2f4dc60712d9044fd1ec6c4dfbf0eadb Fixes: #3749
* Merge "Add `default` parameter for `index_property`"mike bayer2016-07-131-4/+31
|\
| * Add `default` parameter for `index_property`Jeong YunWon2016-07-111-4/+31
| | | | | | | | | | | | And force to use keyword arguments for trivial parameters in index_property Change-Id: I12a178128182f77a2d06b52d7e36f59a36b45a33
* | Ensure DML provides named_with_column for CTE(Alias)Mike Bayer2016-07-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixed bug in new CTE feature for update/insert/delete whereby an anoymous (e.g. no name passed) :class:`.CTE` construct around the statement would fail. The Alias base class of CTE checks for the "named_with_column" attribute in order to detect if the underlying selectable has a name; UpdateBase now provides this as False. Change-Id: I4b0309db21379a4c0cb93085298c86da3cf840e4 Fixes: #3744
* | Merge "Work w/ prefetch even for selects, if present"mike bayer2016-07-133-34/+66
|\ \
| * | Work w/ prefetch even for selects, if presentMike Bayer2016-07-123-34/+66
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug in new CTE feature for update/insert/delete stated as a CTE inside of an enclosing statement (typically SELECT) whereby oninsert and onupdate values weren't called upon for the embedded statement. This is accomplished by consulting prefetch for all statements. The collection is also broken into separate insert/update collections so that we don't need to consult toplevel self.isinsert to determine if the prefetch is for an insert or an update. What we don't yet test for are CTE combinations that have both insert/update in one statement, though these should now work in theory provided the underlying database supports such a statement. Change-Id: I3b6a860e22c86743c91c56a7ec751ff706f66f64 Fixes: #3745
* | Fix issue with unbaking subqueriesMark Hahnenberg2016-07-121-1/+2
|/ | | | | | | | | | Fix improper capture of a loop variable inside a lambda during unbaking of subquery eager loaders, which would cause the incorrect query to be invoked. Fixes: #3743 Change-Id: I995110deb8ee2dae8540486729e1ae64578d28fc Pull-request: https://github.com/zzzeek/sqlalchemy/pull/290
* - fix typoMike Bayer2016-07-071-1/+1
| | | | Change-Id: Ie66d419a5188529a64fcb2e2463c15c26863889f
* Merge "Adapt "FOR UPDATE OF" with Oracle limit/offset"mike bayer2016-07-061-3/+22
|\
| * Adapt "FOR UPDATE OF" with Oracle limit/offsetMike Bayer2016-07-051-3/+22
| | | | | | | | | | | | | | | | | | | | This modifies the Oracle ROWNUM limit/offset approach to accommodate for the "OF" clause in a "FOR UPDATE" phrase. The column expressions must be added to the selected subquery if necessary and adapted on the outside. Change-Id: Ia71b5fc4df6d326e73863f8ae9f96e8f1a5acfc1 Fixes: #3741
* | `index_property` catches IndexError as well as KeyErrorJeong YunWon2016-07-051-1/+1
|/ | | | | | | It was raising AttributeError for key accessing in dict, but raising IndexError for index accessing in array. Change-Id: I58a2252a9e8d7f78cabcefcbe7223a4f3a729115
* - version bumpMike Bayer2016-07-051-1/+1
| | | | Change-Id: I5ace1a90f36678c006d704b452fbbe8a3eb1cd0a
* Repair PG BIGSERIAL w/ TypeDecorator, VariantMike Bayer2016-07-041-0/+3
| | | | | | | | | | | | | Some of the dialect impl memoization for TypeDecorator necessarily keeps the top-level TypeDecorator type around, since a user-defined type will have bind and result set processing behavior. For both TypeDecorator and Variant, PG dialect needs to ensure it's looking at the SQLAlchemy type to check for SmallInteger / BigInteger. Fixes: 3739 Change-Id: I2d45fb997f17c6272d6bb826a77d2dba665adae7 (cherry picked from commit 421fa6b8bf9f0c3c5041579c89ec405ce0f5e0b0)
* Preserve type for math negationMike Bayer2016-07-011-1/+1
| | | | | | | | | | Fixed issue in SQL math negation operator where the type of the expression would no longer be the numeric type of the original. This would cause issues where the type determined result set behaviors. Change-Id: If0e339614a3686e251235fc94b6f59310c4630a5 Fixes: #3735
* Merge "Repair pickling for Properties object"mike bayer2016-06-291-2/+2
|\