| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
exprssed -> expressed
|
|
|
|
|
|
|
|
|
| |
to transient objects with attributes unset would leak NEVER_SET,
and negated_contains_or_equals would do so for any transient
object as the comparison used only the committed value.
Repaired the NEVER_SET cases, fixes #3371, and also made
negated_contains_or_equals() use state_attr_by_column() just
like a non-negated comparison, fixes #3374
|
|
|
|
|
|
|
|
|
| |
determining remote side with semi-self-referential (e.g. two joined
inh subclasses referring to each other), non-simple join conditions
such that the parententity is taken into account and can reduce the
need for using the ``remote()`` annotation; this can restore some
cases that might have worked without the annotation prior to 0.9.4
via :ticket:`2948`. fixes #3364
|
|
|
|
|
|
|
|
| |
simple but unusual system allows for a dramatic savings in Python
overhead for the construction and processing of orm :class:`.Query`
objects, from query construction up through rendering of a string
SQL statement.
fixes #3054
|
| |
|
|
|
|
|
|
|
|
|
|
| |
many-to-one ``!= None`` would fail if the source were an aliased
class, or if the query needed to apply special aliasing to the
expression due to aliased joins or polymorphic querying; also fixed
bug in the case where comparing a many-to-one to an object state
would fail if the query needed to apply special aliasing
due to aliased joins or polymorphic querying.
fixes #3310
|
|
|
|
|
|
|
|
| |
primaryjoin that referred to the same "local" column multiple
times in the "column that points to itself" style of self-referential
join would not be substituted in all cases. The logic to determine
substitutions here has been reworked to be more open-ended.
fixes #3300
|
|
|
|
|
| |
for memoization on a class that uses slots.
- apply many more __slots__. mem use for nova now at 46% savings
|
|
|
|
|
|
| |
bump
foo
|
|
|
|
|
|
|
| |
already have more than one ForeignKeyConstraint referring to them.
This limits the check to what we hope is the most common case,
but we benefit that the memory and config-time impact is scaled back
dramatically.
|
|
|
|
|
|
|
|
|
|
|
|
| |
ultimately will populate a foreign key column in conflict with
another, where the relationships are attempting to copy values
from different source columns. This occurs in the case where
composite foreign keys with overlapping columns are mapped to
relationships that each refer to a different referenced column.
A new documentation section illustrates the example as well as how
to overcome the issue by specifying "foreign" columns specifically
on a per-relationship basis.
fixes #3230
|
|
|
|
|
|
|
| |
primaryjoin contained functions, while at the same time remote_side
was specified; the warning would suggest setting "remote side".
It now only emits if remote_side isn't present.
fixes #3194
|
|
|
|
|
|
| |
- prop.compare() isn't needed; replace with prop._with_parent()
for relationships
- update docs in orm/interfaces
|
|
|
|
|
|
|
| |
: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
|
|
|
|
| |
sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
|
|
|
|
| |
to get all flake8 passing
|
|
|
|
| |
Found using: https://github.com/intgr/topy
|
|
|
|
|
|
|
|
|
|
| |
a join condition that is strictly from a single column to itself,
translated through some kind of SQL function or expression. This
is kind of experimental, but the first proof of concept is a
"materialized path" join condition where a path string is compared
to itself using "like". The :meth:`.Operators.like` operator has
also been added to the list of valid operators to use in a primaryjoin
condition. fixes #3029
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
could inappropriately pull in the parent table, and also return results
inconsistent based on what's in the parent table, when the primaryjoin
includes some kind of discriminator against the parent table, such
as ``and_(parent.id == child.parent_id, parent.deleted == False)``.
While this primaryjoin doesn't make that much sense for a one-to-many,
it is slightly more common when applied to the many-to-one side, and
the one-to-many comes as a result of a backref.
Loading rows from ``child`` in this case would keep ``parent.deleted == False``
as is within the query, thereby yanking it into the FROM clause
and doing a cartesian product. The new behavior will now substitute
the value of the local "parent.deleted" for that parameter as is
appropriate. Though typically, a real-world app probably wants to use a
different primaryjoin for the o2m side in any case.
fixes #2948
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
to specify the string ``"nested"``. When set to ``"nested"`` as opposed
to ``True``, the "chaining" of joins will parenthesize the inner join on the
right side of an existing outer join, instead of chaining as a string
of outer joins. This possibly should have been the default behavior
when 0.9 was released, as we introduced the feature of right-nested
joins in the ORM, however we are keeping it as a non-default for now
to avoid further surprises.
fixes #2976
|
|
|
|
| |
about non-equality operators in general.
|
|
|
|
|
|
| |
sections
- convert all paramter references in relationship documentation to :paramref:
|
| |
|
| |
|
|
|
|
| |
- trim off fn prefix on some relationship parameter names
|
|
|
|
|
|
|
|
|
|
| |
target of :paramref:`.relationship.secondary` for the purposes
of creating very complex :func:`.relationship` join conditions.
The change includes adjustments to query joining, joined eager loading
to not render a SELECT subquery, changes to lazy loading such that
the "secondary" target is properly included in the SELECT, and
changes to declarative to better support specification of a
join() object with classes as targets.
|
|
|
|
|
|
|
|
|
|
|
| |
are used with :func:`.joinedload()` (thereby causing a regression
in joined eager loading) as well as :func:`.aliased`
in conjunction with the ``flat=True`` flag and joined-table inheritance;
basically multiple joins across a "parent JOIN sub" entity using different
paths to get to a target class wouldn't form the correct ON conditions.
An adjustment / simplification made in the mechanics of figuring
out the "left side" of the join in the case of an aliased, joined-inh
class repairs the issue. [ticket:2908]
|
| |
|
|
|
|
|
|
| |
correct string class when setting up a backref based on a name,
therefore causing the error "too many values to unpack". This was
related to the Py3k conversion. [ticket:2901]
|
| |
|
|
|
|
| |
not be superseded. both have a potential use.
|
|
|
|
|
|
|
| |
doesn't resolve to a class or mapper has been corrected to work
the same way as when a non-string arg is received, which indicates
the name of the relationship which had the configurational error.
[ticket:2888]
|
| |
|
|
|
|
|
|
|
|
|
|
| |
with conjunctions, e.g.
``None`` :func:`.expression.null` :func:`.expression.true`
:func:`.expression.false`, including consistency in rendering NULL
in conjunctions, "short-circuiting" of :func:`.and_` and :func:`.or_`
expressions which contain boolean constants, and rendering of
boolean constants and expressions as compared to "1" or "0" for backends
that don't feature ``true``/``false`` constants. [ticket:2804]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables the subquery eager loader strategy to apply a DISTINCT
to the innermost SELECT subquery, to assist in the case where
duplicate rows are generated by the innermost query which corresponds
to this relationship (there's not yet a general solution to the issue
of dupe rows within subquery eager loading, however, when joins outside
of the innermost subquery produce dupes). When the flag
is set to ``True``, the DISTINCT is rendered unconditionally, and when
it is set to ``None``, DISTINCT is rendered if the innermost relationship
targets columns that do not comprise a full primary key.
The option defaults to False in 0.8 (e.g. off by default in all cases),
None in 0.9 (e.g. automatic by default). Thanks to Alexander Koval
for help with this. [ticket:2836]
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
- clean up inspect() calls within query._join()
- make sure join.alias(flat) propagates
- fix almost all assertion tests
|
|
|
|
|
|
|
| |
that the "id" passed from the pickler is turned into a string
to prevent against bytes being parsed on Py3K, as well as that
``relationship()`` and ``orm.join()`` constructs are now properly
serialized. [ticket:2698] and some other observed issues.
|
| |
|
| |
|
| |
|
|
|
|
| |
- support annotations on Column where name isn't immediately present
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
such as ``.. versionadded::``, ``.. versionchanged::`` and ``.. deprecated::``.
|