Commit Graph

10240 Commits

Author SHA1 Message Date
Mike Bayer b9046a163b - re-establish and test some behavior from previous versions, that
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
2014-08-29 14:25:09 -04:00
Mike Bayer eb8a39c58c - The :class:.Query will raise an exception when :meth:.Query.yield_per
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.
2014-08-29 14:01:38 -04:00
Mike Bayer faf319fff5 - we've got 25% improvement so let's talk about it 2014-08-29 13:35:25 -04:00
Mike Bayer 3fb9aed2cc - add some more docs to yield_per 2014-08-29 13:35:03 -04:00
Mike Bayer 9d25eae8ee - use a faster discard when loading
- don't do a bool on identity map since it calls __len__
2014-08-29 13:11:52 -04:00
Mike Bayer a95b0a5b6e - inline the commit of partials too 2014-08-29 12:49:06 -04:00
Mike Bayer fbcb056d90 - Changed the approach by which the "single inheritance criterion"
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
2014-08-29 12:05:00 -04:00
Mike Bayer 08d2c863df - dropping callcounts 2014-08-29 11:22:54 -04:00
Mike Bayer d2a8d5b23c inlines galore 2014-08-29 10:59:13 -04:00
Mike Bayer c192e447f3 - major refactoring/inlining to loader.instances(), though not really
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
2014-08-28 20:06:49 -04:00
Mike Bayer fa55225471 - Made a small adjustment to the mechanics of lazy loading,
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
2014-08-28 17:57:48 -04:00
Mike Bayer 9f4caf97b0 - flake8 2014-08-28 17:42:41 -04:00
Mike Bayer becd78503f - this is small optimization, currently it's the best we can do
for #3175.  fixes #3175 (for now)
2014-08-28 12:41:50 -04:00
Mike Bayer 685a014c64 - A new implementation for :class:.KeyedTuple used by the
:class:`.Query` object offers dramatic speed improvements when
fetching large numbers of column-oriented rows.
fixes #3176
2014-08-28 12:25:21 -04:00
Mike Bayer 00862a29c6 - The behavior of :paramref:.joinedload.innerjoin as well as
: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
2014-08-26 17:23:23 -04:00
Mike Bayer e346ee2c57 - hard-won pep8 formatting of one of the giants... 2014-08-26 16:36:56 -04:00
Mike Bayer f44a4b6437 - updates to migration / changelog for 1.0 2014-08-26 14:44:50 -04:00
Rodrigo Menezes d39be88432 Removed changes that are no longer necessary for postgresql_relkind. Also, removed newline changes. 2014-08-26 13:02:19 -04:00
Rodrigo Menezes b3f7cd8bf4 Merge branch 'master' of https://github.com/zzzeek/sqlalchemy into feature/postgres-relkind 2014-08-26 12:57:00 -04:00
Rodrigo Menezes bcf7a55da0 Remove relkind from construct arguments. 2014-08-26 12:56:54 -04:00
Rodrigo Menezes 2f7dce1d6f Removed all mentions to postgresql_relkind 2014-08-26 12:53:34 -04:00
Mike Bayer 8e84942aa6 - changelog for pr bitbucket:28 2014-08-25 19:14:47 -04:00
Mike Bayer 3531a92416 Merge branch 'mutable-dict-update' of https://bitbucket.org/goodscloud/sqlalchemy into pr27 2014-08-25 19:13:47 -04:00
Mike Bayer 4c1c9d5ed7 - changelog for pr bitbucket:27 2014-08-25 19:13:25 -04:00
Mike Bayer 8c8d6ee95d Merge branch 'mutable-dict-coerce-fix' of https://bitbucket.org/goodscloud/sqlalchemy into pr27 2014-08-25 19:10:43 -04:00
Mike Bayer a16ee423e4 - mention that FOUND_ROWS is hardcoded; fixes #3146 2014-08-25 17:15:16 -04:00
Mike Bayer be2351481f - The "resurrect" ORM event has been removed. This event hook had
no purpose since the old "mutable attribute" system was removed
in 0.8.
fixes #3171
2014-08-25 17:00:21 -04:00
Mike Bayer b1aa0edf81 Merge branch 'pr129'
Conflicts:
	doc/build/changelog/changelog_10.rst
2014-08-23 15:21:54 -04:00
Mike Bayer b490534657 - pep8 formatting for pg table opts feature, tests
- add support for PG INHERITS
- fix mis-named tests
- changelog
fixes #2051
2014-08-23 15:21:16 -04:00
Mike Bayer 575c4ee5c6 Merge remote-tracking branch 'origin/pr/131' 2014-08-21 17:38:23 -04:00
mike bayer b4af17b342 Merge pull request #130 from gthb/docfix-1
Fix doc typos and copy-paste error
2014-08-21 17:33:26 -04:00
Gunnlaugur Þór Briem 42a65014f8 Add note on begin_nested requiring rollback/commit
Avoid confusion about rollback/commit "must be issued" after
``session.begin_nested()`` --- this might be taken to mean call must be
*added*, but that's only true if not using the return value as a context
manager.
2014-08-21 18:43:07 +00:00
Gunnlaugur Þór Briem a12fcd1487 Fix doc typo 'conjunection' 2014-08-21 18:38:23 +00:00
Gunnlaugur Þór Briem 7c4d0a4d66 Fix copy-paste error in Delete doc 2014-08-21 18:38:23 +00:00
Mike Bayer 374173e89d - fix link 2014-08-21 10:29:21 -04:00
Mike Bayer 71ca494f51 - The INSERT...FROM SELECT construct now implies `inline=True`
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
2014-08-20 20:14:20 -04:00
Mike Bayer 89ff6df7dc - pep8 2014-08-20 19:12:32 -04:00
Mike Bayer db70b6e79e - that's it, feature is finished, needs tests 2014-08-20 17:15:20 -04:00
Mike Bayer cb8f5c010b - test for postfetch->sync.populate() having importance during an UPDATE
at the per-table level
2014-08-20 16:31:10 -04:00
Mike Bayer d006e9cc2a - skip these methods 2014-08-20 14:59:16 -04:00
Mike Bayer 22a29cb443 Merge branch 'master' into ticket_3100 2014-08-20 14:25:20 -04:00
Mike Bayer 85e75ebcee - factor out determination of current version id out of
_collect_update_commands and _collect_delete_commands
2014-08-20 14:24:45 -04:00
Mike Bayer d233bb3fc9 Merge branch 'master' into ticket_3100 2014-08-20 13:43:22 -04:00
Mike Bayer 92b0ad0fef - Fixed bug in connection pool logging where the "connection checked out"
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
2014-08-20 12:01:20 -04:00
Mike Bayer cea97d1fae - pep8 cleanup 2014-08-20 09:08:59 -04:00
Mike Bayer fcea5c86d3 - rename mapper._primary_key_props to mapper._identity_key_props
- ensure bulk update is using all PK cols for all tables
2014-08-19 18:26:11 -04:00
Mike Bayer cf14823e41 Merge branch 'master' into ticket_3100 2014-08-19 18:17:25 -04:00
Mike Bayer 28103e9a86 - simplify PK logic in update for row switch 2014-08-19 17:43:50 -04:00
Mike Bayer 91959122e0 - refinements 2014-08-19 14:24:56 -04:00
Mike Bayer a251001f24 dev 2014-08-18 18:52:53 -04:00