| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the vast majority of file lines are spent on documentation, which moves
into package __init__. The core declarative idea lives in base and
is back down to its originally low size of under 500 lines. The various
helpers and such move into api.py, and the full span of string lookup
moves into a new module clsregistry. the rest of declarative only
refers to two functions in clsregistry in three places inside of base.
- [feature] Declarative now maintains a registry
of classes by string name as well as by full
module-qualified name. Multiple classes with the
same name can now be looked up based on a module-qualified
string within relationship(). Simple class name
lookups where more than one class shares the same
name now raises an informative error message.
[ticket:2338]
- lots of tests to ensure the new weak referencing memory management
is maintained by the new class registry system. this ticket was
served very well by waiting to do #2526 first, else this would
have needed to be rewritten anyway.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- modify inspection system:
1. raise a new exception for any case where the inspection
context can't be returned. this supersedes the "not mapped"
errors.
2. don't configure mappers on a mapper inspection. this allows
the inspectors to be used during mapper config time. instead,
the mapper configures on "with_polymorphic_selectable" now,
which is needed for all queries
- add a bunch of new "is_XYZ" attributes to inspectors
- finish making the name change of "compile" -> "configure", for some reason
this was only done partially
|
| |
|
|
|
|
|
|
|
| |
in declarative_base() is now a
WeakValueDictionary. So subclasses of
"Base" that are dereferenced will be
garbage collected, *if they are not
referred to by any other mappers/superclass
mappers*. [ticket:2526]
|
| | |
|
| |
|
|
| |
such as ``.. versionadded::``, ``.. versionchanged::`` and ``.. deprecated::``.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
whereby the precedence of columns
in a joined-table, composite
column (typically for id) would fail to
be correct if the columns contained
names distinct from their attribute
names. This would cause things like
primaryjoin conditions made against the
entity attributes to be incorrect. Related
to [ticket:1892] as this was supposed
to be part of that, this is [ticket:2491].
Also in 0.7.8.
|
| |
|
|
| |
how to make a public API for this anyway
|
| |
|
|
|
| |
called after the __prepare__() step, if any, so that everything to
do with the mapping occurs after the table is reflected.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reflection" system has been moved into the
declarative extension itself, using the
new DeferredReflection class. This
class is now tested with both single
and joined table inheritance use cases.
[ticket:2485]
- [bug] The autoload_replace flag on Table,
when False, will cause any reflected foreign key
constraints which refer to already-declared
columns to be skipped, assuming that the
in-Python declared column will take over
the task of specifying in-Python ForeignKey
or ForeignKeyConstraint declarations.
|
| |
|
|
| |
- split out test_declarative into four separate modules
|
| | |
|
| |
|
|
|
|
|
|
| |
the mapping should not be constructed immediately; instead, the info for
the mapping is placed into an interm object _MapperThingy which serves
as the mapper for the purposes of figuring out inheritance, etc. Later,
the prepare_deferred_mapping() function can be called given a base which
will invoke __prepare__ for each mapped class.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- resolved some serious speed hits I missed, we need to ensure
only deannotated columns are used in the local/remote collections and soforth
so that hash lookups against mapped columns don't dig into __eq__()
- fix some other parity mismatches regarding stuff from [ticket:2453],
including finding another case where _deep_annotate() was doing the wrong thing,
new tests.
- [feature] Major rewrite of relationship()
internals now allow join conditions which
include columns pointing to themselves
within composite foreign keys. A new
API for very specialized primaryjoin conditions
is added, allowing conditions based on
SQL functions, CAST, etc. to be handled
by placing the annotation functions
remote() and foreign() inline within the
expression when necessary. Previous recipes
using the semi-private _local_remote_pairs
approach can be upgraded to this new
approach. [ticket:1401]
|
| | |
| |
| |
| | |
- add foreign, remote annotations to declarative
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
for the benefit of the test.lib.schema package.
- use test.lib.schema.Table for the table within test.lib.fixtures.DeclarativeMappedTest
- [bug] Removed the check for number of
rows affected when doing a multi-delete
against mapped objects. If an ON DELETE
CASCADE exists between two rows, we can't
get an accurate rowcount from the DBAPI;
this particular count is not supported
on most DBAPIs in any case, MySQLdb
is the notable case where it is.
[ticket:2403]
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
declarative_base(). Allows two or more declarative
bases to share the same registry of class names.
|
| |
|
|
| |
no longer compatible with docutils 0.8
|
| |
|
|
|
|
| |
an empty tuple as well as an empty dict.
[ticket:2339]. Thanks to Fayaz Yusuf Khan
for the patch.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
using concrete inheritance in conjunction with
the new ConcreteBase or AbstractConcreteBase
would fail to apply the subclasses deeper than
one level to the "polymorphic loader" of each
base [ticket:2312]
- [bug] Fixed bug whereby a subclass of a subclass
using the new AbstractConcreteBase would fail
to acquire the correct "base_mapper" attribute
when the "base" mapper was generated, thereby
causing failures later on. [ticket:2312]
|
| |
|
|
| |
screwing more things up
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
0.6 docs that don't have these typos
|
| |
|
|
| |
does not propagate to subclasses. [ticket:2283]
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Called after a configure() step has completed and
mappers were in fact affected. Theoretically this
event is called once per application, unless new mappings
are constructed after existing ones have been used
already.
- New declarative features:
- __declare_last__() method, establishes an event
listener for the class method that will be called
when mappers are completed with the final "configure"
step.
- __abstract__ flag. The class will not be mapped
at all when this flag is present on the class.
- New helper classes ConcreteBase, AbstractConcreteBase.
Allow concrete mappings using declarative which automatically
set up the "polymorphic_union" when the "configure"
mapper step is invoked.
- The mapper itself has semi-private methods that allow
the "with_polymorphic" selectable to be assigned
to the mapper after it has already been configured.
[ticket:2239]
|
| | |
|
| |
|
|
| |
- add detail to declarative docs about base classes
|
| |
|
|
|
|
|
|
|
| |
ForeignKeyConstraint refers to a column name in
the parent that is not found. Also in 0.6.9.
- add tests for [ticket:2226], as if we hit each @declared_attr
directly with obj.__get__(obj, name) instead of using
getattr(cls, name). Basic inheritance mechanics are improperly
used in this case, so 2226 is invalid.
|
| |
|
|
|
| |
- add more examples to __table__ such as that asked on a recent
stackoverflow question.
|
| |
|
|
| |
- add link to the concrete declarative thing
|
| |
|
|
|
|
| |
from a superclass of the same name would fail
due to an unnecessary lookup of the name
in the _decl_class_registry. [ticket:2194]
|
| |
|
|
|
|
|
|
| |
to unrelated tables when determining inherit
condition between parent and child class.
This is equivalent to behavior already
applied to declarative. [ticket:2153]
Also in 0.6.8.
|
| |
|
|
|
|
|
|
|
|
| |
- change engine.Connection to _connection_cls so sphinx doesn't get upset
- globally add "." to all :class:`Foo`
- start naming sections that are mostly docstrings "API Documentation - blah blah"
- move some ad-hoc docstrings into "API" sections, there is some inconsistency here
and it may be that we just have to leave it that way
- add "internals" rsts to core, orm, I'm not super thrilled how these look but they are
targeted by some of the public api docs, users typically become aware of these anyway
|
| |
|
|
|
| |
aren't mistaken for always-hashable, possibly-column
arguments. [ticket:2091]
|
| |
|
|
| |
name to reference @declared_attr [ticket:2061]
|
| |
|
|
| |
tuple is now optional. [ticket:1468]
|
| |
|
|
|
|
|
|
| |
Column objects placed inline would fail
to initialize. The Column objects can now
be inline with the composite() or external
and pulled in via name or object ref.
[ticket:2058]
|
| |
|
|
|
| |
'metadata' is used for a column attribute on a
declarative class. [ticket:2050]
|
| |
|
|
|
| |
- documentation for hybrid
- rewrite descriptor, synonym, comparable_property documentation
|
| |
|
|
|
| |
definition, using strings as column names, as an alternative
to the creation of the index outside of the Table.
|
| |
|
|
|
|
|
| |
Don't
want people using them, thinking they're needed in the general case, confused, etc.
The two sections here are moved to the wiki for now.
|
| | |
|