summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
Commit message (Collapse)AuthorAgeFilesLines
* - attempt to write part of _populate_full in C. Performance differenceattempt_c_loadingMike Bayer2014-08-292-1/+258
| | | | | | is pretty much zippo! 1%. to use C code here would require a much more fundamental rewrite of everything so that we aren't just calling python functions.
* - pull out populators back into separate functions, though still very inlinedMike Bayer2014-08-291-82/+114
|
* - further move things vertically, at which point things are inlined enoughMike Bayer2014-08-291-51/+60
| | | | that I'd like to start de-inlining again in the hopes of making this readable.
* - need to use safe_discard() at least in _restore_snapshot(), let's use itMike Bayer2014-08-291-3/+3
| | | | everywhere in Session since the optimized one only applies to loading
* - defaultdict benchmarks faster than a namedtuple; OKMike Bayer2014-08-293-107/+104
| | | | - inline the column-based expiration operations as well
* - reorganize how create_row_processor() communicates up toMike Bayer2014-08-293-82/+84
| | | | | | | | instances(), using a named tuple it can assign to directly. this way we never have to worry about that structure changing anymore, though we are still having it append (key, fn) which is kind of awkward. - inline _populators() into instance(), it's a little verbose but saves an fn call
* - re-establish and test some behavior from previous versions, thatMike Bayer2014-08-291-11/+12
| | | | | | | if a load() or refresh() event changes history (which...why...but anyway) the state of the object is the same; currently it seems that history gets reset but on a refresh, the object still goes into session.dirty - simplify what we store in partials
* - The :class:`.Query` will raise an exception when :meth:`.Query.yield_per`Mike Bayer2014-08-292-3/+20
| | | | | | | | is used with mappings or options where eager loading, either joined or subquery, would take place. These loading strategies are not currently compatible with yield_per, so by raising this error, the method is safer to use - combine with sending False to :meth:`.Query.enable_eagerloads` to disable the eager loaders.
* - add some more docs to yield_perMike Bayer2014-08-291-18/+38
|
* - use a faster discard when loadingMike Bayer2014-08-293-4/+16
| | | | - don't do a bool on identity map since it calls __len__
* - inline the commit of partials tooMike Bayer2014-08-291-3/+3
|
* - Changed the approach by which the "single inheritance criterion"Mike Bayer2014-08-291-1/+1
| | | | | | | | | | is applied, when using :meth:`.Query.from_self`, or its common user :meth:`.Query.count`. The criteria to limit rows to those with a certain type is now indicated on the inside subquery, not the outside one, so that even if the "type" column is not available in the columns clause, we can filter on it on the "inner" query. fixes #3177
* inlines galoreMike Bayer2014-08-291-34/+32
|
* - major refactoring/inlining to loader.instances(), though not reallyMike Bayer2014-08-2812-458/+188
| | | | | | | | | | | any speed improvements :(. code is in a much better place to be run into C, however - The ``proc()`` callable passed to the ``create_row_processor()`` method of custom :class:`.Bundle` classes now accepts only a single "row" argument. - Deprecated event hooks removed: ``populate_instance``, ``create_instance``, ``translate_row``, ``append_result`` - the getter() idea is somewhat restored; see ref #3175
* - Made a small adjustment to the mechanics of lazy loading,Mike Bayer2014-08-282-2/+7
| | | | | | | | | | such that it has less chance of interfering with a joinload() in the very rare circumstance that an object points to itself; in this scenario, the object refers to itself while loading its attributes which can cause a mixup between loaders. The use case of "object points to itself" is not fully supported, but the fix also removes some overhead so for now is part of testing. fixes #3145
* - this is small optimization, currently it's the best we can doMike Bayer2014-08-281-1/+2
| | | | for #3175. fixes #3175 (for now)
* - A new implementation for :class:`.KeyedTuple` used by theMike Bayer2014-08-284-21/+66
| | | | | | :class:`.Query` object offers dramatic speed improvements when fetching large numbers of column-oriented rows. fixes #3176
* - The behavior of :paramref:`.joinedload.innerjoin` as well asMike Bayer2014-08-263-20/+48
| | | | | | | :paramref:`.relationship.innerjoin` is now to use "nested" inner joins, that is, right-nested, as the default behavior when an inner join joined eager load is chained to an outer join eager load. fixes #3008
* - updates to migration / changelog for 1.0Mike Bayer2014-08-261-1/+1
|
* Merge branch 'mutable-dict-update' of ↵Mike Bayer2014-08-251-0/+4
|\ | | | | | | https://bitbucket.org/goodscloud/sqlalchemy into pr27
| * add update() support to MutableDictMatt Chisholm2014-08-091-0/+4
| |
* | Merge branch 'mutable-dict-coerce-fix' of ↵Mike Bayer2014-08-251-3/+3
|\ \ | | | | | | | | | https://bitbucket.org/goodscloud/sqlalchemy into pr27
| * | fix MutableDict.coerceMatt Chisholm2014-08-091-3/+3
| |/ | | | | | | If a class inherited from MutableDict (say, for instance, to add an update() method), coerce() would give back an instance of MutableDict instead of an instance of the derived class.
* | - mention that FOUND_ROWS is hardcoded; fixes #3146Mike Bayer2014-08-251-7/+5
| |
* | - The "resurrect" ORM event has been removed. This event hook hadMike Bayer2014-08-252-23/+0
| | | | | | | | | | | | no purpose since the old "mutable attribute" system was removed in 0.8. fixes #3171
* | Merge branch 'pr129'Mike Bayer2014-08-231-1/+71
|\ \ | | | | | | | | | | | | Conflicts: doc/build/changelog/changelog_10.rst
| * | - pep8 formatting for pg table opts feature, testsMike Bayer2014-08-231-24/+59
| | | | | | | | | | | | | | | | | | | | | - add support for PG INHERITS - fix mis-named tests - changelog fixes #2051
| * | Adding postgres create table options documentationpr/129Malik Diarra2014-08-171-0/+16
| | |
| * | Correcting options name from withoids to with_oidsMalik Diarra2014-08-171-3/+3
| | |
| * | quoting tablespace name in create table command in postgresql dialectMalik Diarra2014-08-171-1/+2
| | |
| * | Adding oids and on_commit table optionsMalik Diarra2014-08-171-1/+11
| | |
| * | Adding a tablespace options for postgresql create tableMalik Diarra2014-08-171-1/+9
| | |
* | | Fix doc typo 'conjunection'pr/130Gunnlaugur Þór Briem2014-08-211-1/+1
| | |
* | | Fix copy-paste error in Delete docGunnlaugur Þór Briem2014-08-211-2/+2
| | |
* | | - fix linkMike Bayer2014-08-211-1/+1
| | |
* | | - The INSERT...FROM SELECT construct now implies ``inline=True``Mike Bayer2014-08-202-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on :class:`.Insert`. This helps to fix a bug where an INSERT...FROM SELECT construct would inadvertently be compiled as "implicit returning" on supporting backends, which would cause breakage in the case of an INSERT that inserts zero rows (as implicit returning expects a row), as well as arbitrary return data in the case of an INSERT that inserts multiple rows (e.g. only the first row of many). A similar change is also applied to an INSERT..VALUES with multiple parameter sets; implicit RETURNING will no longer emit for this statement either. As both of these constructs deal with varible numbers of rows, the :attr:`.ResultProxy.inserted_primary_key` accessor does not apply. Previously, there was a documentation note that one may prefer ``inline=True`` with INSERT..FROM SELECT as some databases don't support returning and therefore can't do "implicit" returning, but there's no reason an INSERT...FROM SELECT needs implicit returning in any case. Regular explicit :meth:`.Insert.returning` should be used to return variable numbers of result rows if inserted data is needed. fixes #3169
* | | - factor out determination of current version id out ofMike Bayer2014-08-201-55/+55
| | | | | | | | | | | | _collect_update_commands and _collect_delete_commands
* | | - Fixed bug in connection pool logging where the "connection checked out"Mike Bayer2014-08-201-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | debug logging message would not emit if the logging were set up using ``logging.setLevel()``, rather than using the ``echo_pool`` flag. Tests to assert this logging have been added. This is a regression that was introduced in 0.9.0. fixes #3168
* | | - simplify PK logic in update for row switchMike Bayer2014-08-192-16/+9
| | |
* | | - optimize collection of cols we insert as noneMike Bayer2014-08-182-17/+11
| | |
* | | - move out checks for table in mapper._pks_by_tableMike Bayer2014-08-181-16/+32
| | |
* | | - further reorganize collect_insert_commands to distinguish betweenMike Bayer2014-08-181-13/+21
| | | | | | | | | | | | | | | setting up given values vs. defaults. again trying to shoot for making this of more general use
* | | - organize persistence methods in terms of generators,Mike Bayer2014-08-181-93/+94
| | | | | | | | | | | | | | | | | | narrow down argument lists and generator items for each function down to just what each function needs. This will help for them to be of more multipurpose use for bulk operations
* | | - major simplification of _collect_update_commands. in particular,Mike Bayer2014-08-182-83/+70
| | | | | | | | | | | | | | | | | | we only call upon the history API fully for primary key columns. We also now skip the whole step of looking at PK columns and using any history at all if no net changes are detected on the object.
* | | - Fixed bug where attribute "set" events or columns withMike Bayer2014-08-172-19/+22
| | | | | | | | | | | | | | | | | | | | | | | | ``@validates`` would have events triggered within the flush process, when those columns were the targets of a "fetch and populate" operation, such as an autoincremented primary key, a Python side default, or a server-side default "eagerly" fetched via RETURNING. fixes #3167
* | | - oldest screwup in the book, forgot the fileMike Bayer2014-08-161-0/+167
|/ /
* | - rework profiling, zoomark tests into single tests so thatMike Bayer2014-08-162-250/+78
| | | | | | | | they can be used under xdist
* | - changelog for pullreq github:125Mike Bayer2014-08-161-0/+10
| | | | | | | | - add pg8000 version detection for the "sane multi rowcount" feature
* | Merge remote-tracking branch 'origin/pr/125' into pr125Mike Bayer2014-08-161-3/+1
|\ \
| * | pg8000 now supports sane_multi_rowcountpr/125Tony Locke2014-08-021-1/+1
| | | | | | | | | | | | | | | From pg8000-1.9.14 sane_multi_rowcount is supported so this commit updates the dialect accordingly.