| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
- prop.compare() isn't needed; replace with prop._with_parent()
for relationships
- update docs in orm/interfaces
|
|
|
|
| |
sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
|
|
|
|
| |
to get all flake8 passing
|
|
|
|
|
|
| |
of :ticket:`3060` from verision 0.9.5. A self-referential relationship
with lazy='dynamic' would raise a TypeError within a flush operation.
fixes #3099
|
| |
|
|
|
|
| |
didn't match. use straight memoized_props here for now, add a perf test to check it
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The system of loader options has been entirely rearchitected to build
upon a much more comprehensive base, the :class:`.Load` object. This
base allows any common loader option like :func:`.joinedload`,
:func:`.defer`, etc. to be used in a "chained" style for the purpose
of specifying options down a path, such as ``joinedload("foo").subqueryload("bar")``.
The new system supersedes the usage of dot-separated path names,
multiple attributes within options, and the usage of ``_all()`` options.
- Added a new load option :func:`.orm.load_only`. This allows a series
of column names to be specified as loading "only" those attributes,
deferring the rest.
|
|
|
|
|
|
|
|
|
| |
- rework the event system so that event modules load after their
targets, dependencies are reversed
- create an improved strategy lookup system for the ORM
- rework the ORM to have very few import cycles
- move out "importlater" to just util.dependency
- other tricks to cross-populate modules in as clear a way as possible
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the import structure of many core modules.
``sqlalchemy.schema`` and ``sqlalchemy.types``
remain in the top-level package, but are now just lists of names
that pull from within ``sqlalchemy.sql``. Their implementations
are now broken out among ``sqlalchemy.sql.type_api``, ``sqlalchemy.sql.sqltypes``,
``sqlalchemy.sql.schema`` and ``sqlalchemy.sql.ddl``, the last of which was
moved from ``sqlalchemy.engine``. ``sqlalchemy.sql.expression`` is also
a namespace now which pulls implementations mostly from ``sqlalchemy.sql.elements``,
``sqlalchemy.sql.selectable``, and ``sqlalchemy.sql.dml``.
Most of the "factory" functions
used to create SQL expression objects have been moved to classmethods
or constructors, which are exposed in ``sqlalchemy.sql.expression``
using a programmatic system. Care has been taken such that all the
original import namespaces remain intact and there should be no impact
on any existing applications. The rationale here was to break out these
very large modules into smaller ones, provide more manageable lists
of function names, to greatly reduce "import cycles" and clarify the
up-front importing of names, and to remove the need for redundant
functions and documentation throughout the expression package.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
:class:`.AttributeImpl` as an "initiator" token has been changed;
the object is now an event-specific object called :class:`.attributes.Event`.
Additionally, the attribute system no longer halts events based
on a matching "initiator" token; this logic has been moved to be
specific to ORM backref event handlers, which are the typical source
of the re-propagation of an attribute event onto subsequent append/set/remove
operations. End user code which emulates the behavior of backrefs
must now ensure that recursive event propagation schemes are halted,
if the scheme does not use the backref handlers. Using this new system,
backref handlers can now peform a
"two-hop" operation when an object is appended to a collection,
associated with a new many-to-one, de-associated with the previous
many-to-one, and then removed from a previous collection. Before this
change, the last step of removal from the previous collection would
not occur.
[ticket:2789]
|
| |
|
|
|
|
|
|
| |
on regular append/remove history
- fix the real cause of the original #2637 issue, backrefs call upon
the "pop()" method now which wasn't implemented for Dynamic
|
|
|
|
|
|
|
| |
that's
the wrong behavior, and for the original #2637 issue we will have to fix the
association proxy, which is #2642
|
|
|
|
|
|
|
|
|
|
| |
DynamicAttributeImpl
- Fixes to the "dynamic" loader on :func:`.relationship`, includes
that backrefs will work properly even when autoflush is disabled,
history events are more accurate in scenarios where multiple add/remove
of the same object occurs, as can often be the case in conjunction
with the association proxy. [ticket:2637]
|
|
|
|
| |
- add "extend()" to AppenderQuery
|
| |
|
|
|
|
|
| |
is combined with a "dynamic" loader.
This is a warning in 0.7.9.
|
|
|
|
|
|
|
|
|
| |
to an instrumented collection is no longer
associated with the parent class due to
expiration/attribute refresh/collection
replacement, but an append
or remove operation is received on the
now-detached collection. [ticket:2476]
|
| |
|
|
|
|
|
|
|
|
| |
- break out key mechanics of loading objects
into new "orm.loading" module, removing implementation
details from both mapper.py and query.py. is analogous
to persistence.py
- some other cleanup and old cruft removal
|
|\ |
|
| |
| |
| |
| |
| | |
- start dressing up InstanceState for it's coming out, start moving
internal things to be underscored within the lib
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- remove() on a scalar object will raise if the object
removed is not what was present.
- InstanceState can be pickled if obj() is None; this
to support the other changes in this commit
- only use trackparent flag on attributes if
single_parent or ONETOMANY; otherwise we can skip this
overhead
- attribute hasparent()/sethasparent() check that trackparent
is set, else their usage is invalid
- [bug] Fixed backref behavior when "popping" the
value off of a many-to-one in response to
a removal from a stale one-to-many - the operation
is skipped, since the many-to-one has since
been updated. [ticket:2315]
- [bug] After some years of not doing this, added
more granularity to the "is X a parent of Y"
functionality, which is used when determining
if the FK on "Y" needs to be "nulled out" as well
as if "Y" should be deleted with delete-orphan
cascade. The test now takes into account the
Python identity of the parent as well its identity
key, to see if the last known parent of Y is
definitely X. If a decision
can't be made, a StaleDataError is raised. The
conditions where this error is raised are fairly
rare, requiring that the previous parent was
garbage collected, and previously
could very well inappropriately update/delete
a record that's since moved onto a new parent,
though there may be some cases where
"silent success" occurred previously that will now
raise in the face of ambiguity.
Expiring "Y" resets the "parent" tracker, meaning
X.remove(Y) could then end up deleting Y even
if X is stale, but this is the same behavior
as before; it's advised to expire X also in that
case. [ticket:2264]
|
|
|
|
|
|
|
| |
classes to a new test.lib.fixtures module
- move testing.TestBase to test.lib.fixtures
- massive search and replace
|
|
|
|
|
|
| |
PASSIVE_OFF, now expresed as non-boolean symbols
- make "passive" available positionally on all get_history() methods,
call it like that
|
| |
|
|
|
|
|
| |
a consistent tag
- AUTHORS file
|
| |
|
| |
|
| |
|
|
|
|
| |
receivers
|
|
|
|
| |
- add test coverage for the rare case of noload->lazyload + pickle
|
| |
|
|\ |
|
| |\ |
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | | |
access to get at mapped properties by name
|
|\ \ \ \
| | |_|/
| |/| | |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Issues the usual "lazy" load operation automatically
as the object is populated. The use case
here is when loading objects to be placed in
an offline cache, or otherwise used after
the session isn't available, and straight 'select'
loading, not 'joined' or 'subquery', is desired.
[ticket:1914]
|
|\ \ \
| |/ / |
|
| |/
| |
| |
| |
| |
| |
| | |
an object from one reference to another, with
backrefs involved, where the initiating parent
was a subclass (with its own mapper) of the
previous parent.
|
|/ |
|
|
|
|
|
|
|
|
| |
population - added an assertion for when
set_committed_value() is called, as well as
when joinedload() or subqueryload() options
are applied to a dynamic attribute, instead
of failure / silent failure. [ticket:1864]
|
| |
|
|
|
|
| |
instance if that instance is "pending". [ticket:1789]
|
|
|
|
|
|
| |
relationship(), to eliminate confusion over the relational
algebra term. relation() however will remain available
in equal capacity for the foreseeable future. [ticket:1740]
|
|
|
|
|
| |
cleanup with less complexity, datamembers,
method calls, blank dictionary creates.
|