summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Cascade mappers in terms of the instance's mapperMike Bayer2017-05-123-4/+159
|/ | | | | | | | | | | | | | | Fixed a (extremely old) bug in cascade_mappers where the first cascade we do is against the "self" mapper, and not the one that actually corresponds to the state given. These are different in the case where we start with a relationship to a class, and the instance is of a subclass, which itself can have relationships that aren't on the base mapper. A pretty severe bug that somehow has avoided the radar since the beginning. Change-Id: I512956b9757b07e06f3ca1ccb507a33fb10bed31 Fixes: #3986
* Add links to with_only_columns to Select.column, append_columnMike Bayer2017-05-121-19/+16
| | | | | | | | | | | Provide a brief example for these two methods indicating that typically a table-bound (or other selectable) column is appended here, then link to with_only_columns documentation which has in-depth guidelines already including that one should not append columns from the current select to itself. Change-Id: I0742405a7f3c41450d337b9c633519d9cc101dfb Fixes: #3987
* Merge "Update inheritance documentation."mike bayer2017-05-105-696/+1271
|\
| * Update inheritance documentation.Mike Bayer2017-05-105-696/+1271
| | | | | | | | | | | | | | | | The inheritance documentation is confused, disorganized, and out of date. Reorganize and clarify, in particular in preparation for new inheritance features. Change-Id: Ibe6a35b4b0432bad866a6afb0598b2cf1b509f10
* | Merge "Add conditionals specific to deferred for expire ro properties"mike bayer2017-05-103-4/+70
|\ \
| * | Add conditionals specific to deferred for expire ro propertiesMike Bayer2017-05-103-4/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where a :func:`.column_property` that is also marked as "deferred" would be marked as "expired" during a flush, causing it to be loaded along with the unexpiry of regular attributes even though this attribute was never accessed. Change-Id: Iaa9e17b66ece30a8e729e4af746b31ff99b1ec9a Fixes: #3984
* | | Fix docs syntax errorDenis Kataev2017-05-101-8/+6
|/ /
* | Merge "Use regexp to parse cx_oracle version string"mike bayer2017-05-093-2/+42
|\ \
| * | Use regexp to parse cx_oracle version stringMike Bayer2017-05-093-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug in cx_Oracle dialect where version string parsing would fail for cx_Oracle version 6.0b1 due to the "b" character. Version string parsing is now via a regexp rather than a simple split. Change-Id: I2af7172b0d7184e3ea3bd051e9fa8d6ca2a571cd Fixes: #3975
* | | Support autocommit for GRANT and REVOKE on postgresqlJacob Hayes2017-05-093-1/+14
|/ / | | | | | | | | | | | | Extends `AUTOCOMMIT_REGEXP` for the postgres dialect to include `GRANT` and `REVOKE`. Change-Id: Iba15f1ebf5bd7bc0fc1193fdf561417e53bf5d57 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/357
* | Protect against cls weakref becoming NoneMike Bayer2017-05-083-4/+19
| | | | | | | | | | | | | | | | | | | | Protected against testing "None" as a class in the case where declarative classes are being garbage collected and new automap prepare() operations are taking place concurrently, very infrequently hitting a weakref that has not been fully acted upon after gc. Change-Id: I32e1dfc5ac46bac4127fe808cfd18368e2fad9dd
* | Merge branch 'master' of https://github.com/aflyhorse/sqlalchemyMike Bayer2017-05-081-9/+10
|\ \
| * | Break the lines to fit pdf and fix another broken syntaxLunarShaddow2017-05-081-6/+10
| | |
| * | remove ambiguous line breakers to help sphinx identify code blockLunarShaddow2017-05-051-5/+2
| |/
* | - add 1.2 forwards-port versionMike Bayer2017-05-081-0/+2
| | | | | | | | Change-Id: I093f3939be8858a2f327c5ee5884b9629b216855
* | Merge branch 'patch-1' of https://github.com/UnquietCode/sqlalchemyMike Bayer2017-05-081-1/+1
|\ \
| * | fixes a typoBen Fagin2017-05-011-1/+1
| |/
* | - big rewrite of the Sequence documentation:Mike Bayer2017-05-052-90/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Sequence should be associated with MetaData always, except in the really weird case someone is sharing a Sequence among multiple metadatas. Make this a "best practice", end the confusion of #3951, #3979 2. "optional" is not a thing people use, trim this way down 3. remove confusing language Change-Id: Iab5aec319da2582092fe2615ee50430f76441aff (cherry picked from commit a1dcf23e371695d8d3be2e1d7875fad10f16a656)
* | - add another note re: 339e2c13b0fc8e95a47d00c0f8fc5afc4b6dff9aMike Bayer2017-05-051-0/+12
| | | | | | | | | | | | | | | | which clarifies that ForeignKey circumvents this logic as a "convenience". issue #3978 is updated to address trying to make this consistent. Change-Id: I089acaa89f11b7a6310c2bf32916e26eb62ab9c0
* | - add a note to MetaData.schema indicating that the TableMike Bayer2017-05-051-0/+13
|/ | | | | | | will be cataloged in the .tables collection with its fully qualified name. Fixes #3978 Change-Id: I65fa063918efc22658e93c39a0680cb83553dec8
* - typoMike Bayer2017-04-281-1/+1
| | | | Change-Id: Iab741ce3739ed4172196f99c519c9333637383fd
* Call proxied collection before invoking creator in associationlist.append()Mike Bayer2017-04-283-2/+112
| | | | | | | | | | | | Improved the association proxy list collection so that premature autoflush against a newly created association object can be prevented in the case where ``list.append()`` is being used, and a lazy load would be invoked when the association proxy accesses the endpoint collection. The endpoint collection is now accessed first before the creator is invoked to produce the association object. Change-Id: I008a6dbdfe5b1c0dfd02189c3d954d83a65f3fc5 Fixes: #3941
* - keep trying to identify the race here. can reproduce locallyMike Bayer2017-04-271-11/+11
| | | | | | now and it seems like mock might not be doing the right thing. Change-Id: I5c108d82631c9217da54a8ace68d7728c3e204d8
* Enforce boolean result type for all eq_, is_, isnot, comparisonMike Bayer2017-04-275-4/+32
| | | | | | | | | | | | Repaired issue where the type of an expression that used :meth:`.ColumnOperators.is_` or similar would not be a "boolean" type, instead the type would be "nulltype", as well as when using custom comparison operators against an untyped expression. This typing can impact how the expression behaves in larger contexts as well as in result-row-handling. Change-Id: Ib810ff686de500d8db26ae35a51005fab29603b6 Fixes: #3873
* - try to work around a race that can occur in STP whenMike Bayer2017-04-271-2/+11
| | | | | | used in this intentionally broken scenario Change-Id: I88ea6fa710da2189e6d47e2d12f5f0fd6f6bb7d4
* - ensure that sqlalchemy.ext is set up for importlaterMike Bayer2017-04-272-1/+1
| | | | | | | | | | | | | otherwise, it fails if you import from ext before orm: from sqlalchemy import * from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import * and then do a lazyload, as the ext.baked importlater is not initialized. Change-Id: I24dcbfc9ca9022316da28507772562833e45dd95
* Add selectin loadingMike Bayer2017-04-2616-18/+2691
| | | | | | | | | | Adding a new kind of relationship loader that is a cross between the "immediateload" and the "subquery" eager loader, using an IN criteria to load related items in bulk immediately after the lead query result is loaded. Change-Id: If13713fba9b465865aef8fd50b5b6b977fe3ef7d Fixes: #3944
* test / document postgresql_ops against a labeled expressionMike Bayer2017-04-242-8/+45
| | | | | | | | | | Since postgresql_ops explicitly states that it expects string keys, to apply to a function call or expression one needs to give the SQL expression a label that can be referred to by name in the dictionary. test / document this. Change-Id: I4bc4ade46dac27f9c1b92e7823433292beab97b9 Fixes: #3970
* - editsMike Bayer2017-04-221-3/+2
| | | | Change-Id: If2445c4cbcd7eb18e06823e8821940a391890979
* Merge branch 'master' of ssh://gerrit.sqlalchemy.org:29418/zzzeek/sqlalchemyMike Bayer2017-04-213-2/+30
|\
| * Add _negate() to Label to negate inner elementMike Bayer2017-04-213-2/+30
| | | | | | | | | | | | | | | | | | Fixed the negation of a :class:`.Label` construct so that the inner element is negated correctly, when the :func:`.not_` modifier is applied to the labeled expression. Change-Id: Ia99917b2959bdfbff28689c962b4203911c57b85 Fixes: #3969
* | - update relationship loader docs, backport fromMike Bayer2017-04-215-358/+688
|/ | | | | | 1.2 wip Change-Id: I0a3c4a0166f6feed23a021723233d281fad597ec
* Merge branch 'UnmappedInstanceError_typo_fix' of ↵Mike Bayer2017-04-171-1/+1
|\ | | | | | | https://github.com/suever/sqlalchemy
| * Fix of minor typo in the UnmappedInstanceError messageJonathan Suever2017-04-061-1/+1
| |
* | - remove errant doctest commentMike Bayer2017-04-171-2/+2
| | | | | | | | Change-Id: Idb8520ff807074ceca36645728a63b79d1cdff6c
* | Accommodate for query._current_path in subq eager load join_depthMike Bayer2017-04-173-3/+49
| | | | | | | | | | | | | | | | | | | | Fixed bug in subquery eager loading where the "join_depth" parameter for self-referential relationships would not be correctly honored, loading all available levels deep rather than correctly counting the specified number of levels for eager loading. Change-Id: Ifa54085cbab3b41c2196f3ee519f485c63e4cb8d Fixes: #3967
* | Merge "Use baked lazyloading by default"mike bayer2017-04-1416-468/+1029
|\ \
| * | Use baked lazyloading by defaultMike Bayer2017-04-1316-468/+1029
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ``lazy="select"`` loader strategy now makes used of the :class:`.BakedQuery` query caching system in all cases. This removes most overhead of generating a :class:`.Query` object and running it into a :func:`.select` and then string SQL statement from the process of lazy-loading related collections and objects. The "baked" lazy loader has also been improved such that it can now cache in most cases where query load options are used. Change-Id: Ic96792fffaa045ae9aa0a4657d6d29235d3efb85 Fixes: #3954
* | | Remove MySQL UTC_TIMESTAMP ruleMike Bayer2017-04-134-4/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | Removed an ancient and unnecessary intercept of the UTC_TIMESTAMP MySQL function, which was getting in the way of using it with a parameter. Change-Id: I6e6b52c051418bcb9d31987e78299310810cb78d Fixes: #3966
* | | - typos and formattingMike Bayer2017-04-121-3/+3
|/ / | | | | | | Change-Id: I88a304e315b68eded31e91da04265da583bc417b
* | - OK, take oracle out of memory-intensive, if it doesn't leak memoryMike Bayer2017-04-121-1/+1
| | | | | | | | | | | | then we get the TNS error from too many connections Change-Id: Ie685173cd1490d99c5f37a1045e1312c4d9125ea
* | - try one more test, then we're likely going to give up on cx_OracleMike Bayer2017-04-121-29/+30
| | | | | | | | Change-Id: I7f9a1265664b0368ee7a771d01c7ca1612156d1f
* | - move a few memusage tests out of "backend". something is up w/ cx_OracleMike Bayer2017-04-121-30/+35
| | | | | | | | | | | | | | when the suite runs, such as a background thread or something like that, which is affecting these tests a bit. Change-Id: I52d50a44778ec1eecb8e335ae59b1a4773e80a79
* | Warn on _compiled_cache growthMike Bayer2017-04-126-31/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added warnings to the LRU "compiled cache" used by the :class:`.Mapper` (and ultimately will be for other ORM-based LRU caches) such that when the cache starts hitting its size limits, the application will emit a warning that this is a performance-degrading situation that may require attention. The LRU caches can reach their size limits primarily if an application is making use of an unbounded number of :class:`.Engine` objects, which is an antipattern. Otherwise, this may suggest an issue that should be brought to the SQLAlchemy developer's attention. Additionally, adjusted the test_memusage algorithm again as the previous one could still allow a growing memory size to be missed. Change-Id: I020d1ceafb7a08f6addfa990a1e7acd09f933240
* | Set up base ARRAY to be compatible with postgresql.ARRAY.Mike Bayer2017-04-114-114/+160
| | | | | | | | | | | | | | | | | | | | For some reason, when ARRAY was added to the base it was never linked to postgresql.ARRAY. Link the two types and also make base ARRAY the schema event target so that it supports the same features as postgresql.ARRAY. Change-Id: I82fa6c9d2b8c5028dba3a009715f7bc296b2bc0b Fixes: #3964
* | Merge "Compare entities also on chop_path"mike bayer2017-04-104-1/+218
|\ \
| * | Compare entities also on chop_pathMike Bayer2017-04-104-1/+218
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When comparing query._current_path to options, the path chop was not taking into account that the query or the options are against aliased classes that don't match the mapper. The issue does not seem to take place for the Load() version of _chop_path. Fixed bug to improve upon the specificity of loader options that take effect subsequent to the lazy load of a related entity, so that the loader options will match to an aliased or non-aliased entity more specifically if those options include entity information. Fixes: #3963 Change-Id: Ifdff37d579042fcc62bdeabce9e2413e9a03fbba
* | Add new "expanding" feature to bindparam()Mike Bayer2017-04-0712-21/+369
|/ | | | | | | | | | | | | | | | Added a new kind of :func:`.bindparam` called "expanding". This is for use in ``IN`` expressions where the list of elements is rendered into individual bound parameters at statement execution time, rather than at statement compilation time. This allows both a single bound parameter name to be linked to an IN expression of multiple elements, as well as allows query caching to be used with IN expressions. The new feature allows the related features of "select in" loading and "polymorphic in" loading to make use of the baked query extension to reduce call overhead. This feature should be considered to be **experimental** for 1.2. Fixes: #3953 Change-Id: Ie708414a3ab9c0af29998a2c7f239ff7633b1f6e
* Consider mysql partition options separately from other table optionsMike Bayer2017-04-063-5/+76
| | | | | | | | | Move down all the PARTITION, SUBPARTITION options into a separate segment so that they come out at the end of CREATE TABLE after the table options. Change-Id: Iaa1c823848c93680ca22d72bda1b7c49742b9060 Fixes: #3961
* - add placeholder for 1.1.10Mike Bayer2017-04-061-0/+3
| | | | Change-Id: I068dd3b47dec200740db617891a64798db8f1734