| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
additional test
that is much more specific to #1326
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:meth:`.Session.get_bind` method when calling upon
:meth:`.Query.count`, :meth:`.Query.update`, :meth:`.Query.delete`,
as well as queries against mapped columns,
:obj:`.column_property` objects, and SQL functions and expressions
derived from mapped columns. This allows sessions that rely upon
either customized :meth:`.Session.get_bind` schemes or "bound" metadata
to work in all relevant cases.
fixes #3227 fixes #3242 fixes #1326
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
sane multi rowcount (e.g. pyodbc) would fail on multirow update. add
a test that mocks this breakage into plain dialects
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
the :func:`.orm.load_only` option to cover all attributes not
explicitly mentioned, now takes into account the superclasses
of a given entity, if that entity is mapped with inheritance mapping,
so that attribute names within the superclasses are also omitted
from the load. Additionally, the polymorphic discriminator column
is unconditionally included in the list, just in the same way that
primary key columns are, so that even with load_only() set up,
polymorphic loading of subtypes continues to function correctly.
fixes #3287
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:class:`.Query` before it fetched results, particularly when
row processors can't be formed, the cursor would stay open with
results pending and not actually be closed. This is typically only
an issue on an interpreter like Pypy where the cursor isn't
immediately GC'ed, and can in some circumstances lead to transactions/
locks being open longer than is desirable.
fixes #3285
|
| | |
| |
| |
| |
| | |
for memoization on a class that uses slots.
- apply many more __slots__. mem use for nova now at 46% savings
|
| | |
| |
| |
| | |
- this needs to be serializable and isn't high volume so just whack the slots
|
| | | |
|
| | |
| |
| |
| | |
allowing us to move to __slots__
|
| | |
| |
| |
| |
| | |
size of the many per-column objects we're hitting, but somehow the overall memory is
hardly being reduced at all in initial testing
|
| | |
| |
| |
| | |
isinstance() calls, express intent more clearly
|
| | |
| |
| |
| |
| |
| | |
bump
foo
|
| | |
| |
| |
| | |
- attempt to add a script to semi-automate the fixing of links
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
to :meth:`.Session.close`, except also calls
:meth:`.Connection.invalidate`
on all connections, guaranteeing that they will not be returned to
the connection pool. This is useful in situations e.g. dealing
with gevent timeouts when it is not safe to use the connection further,
even for rollbacks.
references #3258
|
| | |
| |
| |
| | |
a lot clearer, partial fixes for #3252
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
directly into the unit of work's facility for emitting INSERT
and UPDATE statements has been created. When used correctly,
this expert-oriented system can allow ORM-mappings to be used
to generate bulk insert and update statements batched into
executemany groups, allowing the statements to proceed at
speeds that rival direct use of the Core.
fixes #3100
|
| | | |
|
| | |
| |
| |
| | |
- start writing docs
|
| | | |
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| | |
to the aliasing syntax, as well as a new CTE feature
:meth:`.CTE.suffix_with`, which is useful for adding in special
Oracle-specific directives to the CTE.
fixes #3220
|
| | | |
|
| | |\
| | |
| | |
| | | |
https://bitbucket.org/jvanasco/sqlalchemy-alt into pr32
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(https://bitbucket.org/zzzeek/sqlalchemy/issue/3217/make-join-more-standard-or-improve-error)
$ python setup.py develop
$ pip install nose
$ pip install mock
$ ./sqla_nose.py test.orm.test_joins
.....................................................................................................
----------------------------------------------------------------------
Ran 101 tests in 1.222s
OK
$ ./sqla_nose.py test.orm
......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S......................................................................................................................................................................................................................................................................................................................S.......................................................................................................................................................................................................................................................................................................................................................S.......S..S.SSS.SS...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S................................S..S........................S...........................................................................................SSS.S.........SSSSSSSS......SSSSSSSSS........SS...SS...............S.............................S..............................................................SS..SS..............................................................................................................S.
----------------------------------------------------------------------
Ran 3103 tests in 82.607s
OK (SKIP=46)
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
improved in conjunction with loader directives such as
:func:`.joinedload` and :func:`.contains_eager` such that if
two :meth:`.PropComparator.of_type` modifiers of the same
base type/path are encountered, they will be joined together
into a single "polymorphic" entity, rather than replacing
the entity of type A with the one of type B. E.g.
a joinedload of ``A.b.of_type(BSub1)->BSub1.c`` combined with
joinedload of ``A.b.of_type(BSub2)->BSub2.c`` will create a
single joinedload of ``A.b.of_type((BSub1, BSub2)) -> BSub1.c, BSub2.c``,
without the need for the ``with_polymorphic`` to be explicit
in the query.
fixes #3256
|
| | | |
| | |
| | |
| | | |
issues
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
non-recommended use case of replacing a relationship on a fixed
mapped class many times, referring to an arbitrarily growing number of
target mappers. A warning is emitted when the old relationship is
replaced, however if the mapping were already used for querying, the
old relationship would still be referenced within some registries.
fixes #3251
|
| | | | |
|
| |\ \ \
| |/ /
| | |
| | |
| | | |
Conflicts:
lib/sqlalchemy/orm/persistence.py
|
| | | |
| | |
| | |
| | | |
Output in the error message the table name and the column name.
|
| |\ \ \
| |/ / |
|
| | | |
| | |
| | |
| | | |
Output in the error message the table name and the column name.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
that included the same single inh entity more than once
(normally this should raise an error) could, in some cases
depending on what was being joined "from", implicitly alias the
second case of the single inh entity, producing
a query that "worked". But as this implicit aliasing is not
intended in the case of single table inheritance, it didn't
really "work" fully and was very misleading, since it wouldn't
always appear.
fixes #3233
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
and :meth:`.Query.outerjoin` to a single-inheritance subclass
using ``of_type()`` would not render the "single table criteria" in
the ON clause if the ``from_joinpoint=True`` flag were set.
fixes #3232
|
| | |\ \ |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
the given object if the object had been subject to a delete
operation that was flushed, but not committed. This would also
affect related operations like :func:`.make_transient`.
fixes #3139
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
names in the given dictionary of values into mapped attribute names
against the mapped class being updated. Previously, string names
were taken in directly and passed to the core update statement without
any means to resolve against the mapped entity. Support for synonyms
and hybrid attributes as the subject attributes of
:meth:`.Query.update` are also supported.
fixes #3228
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
"binds" (e.g. engines to use), such engines can be associated with
mixin classes, concrete subclasses, as well as a wider variety
of table metadata such as joined inheritance tables.
fixes #3035
|
| | |\ \ \ |
|