| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ORM attributes can now be assigned any object that is has a
``__clause_element__()`` attribute, which will result in inline
SQL the way any :class:`.ClauseElement` class does. This covers other
mapped attributes not otherwise transformed by further expression
constructs.
As part of this, it was considered that we could add
__clause_element__() to ClauseElement, however this causes endless loops
in a "while" pattern and this pattern has been identified in third
party libraries. Add a test to ensure we never make that change.
Change-Id: I9e15b3f1c4883fd3909acbf7dc81d034c6e3ce1d
Fixes: #3802
|
|
|
|
|
|
|
|
|
|
|
| |
Keystone and others depend on the .property attribute being
"mirrored" when a @hybrid_property is linked directly to a
mapped attribute. Restore this linkage and also create a defined
behavior for the .info dictionary; it is that of the hybrid itself.
Add this behavioral change to the migration notes.
Change-Id: I8ac34ef52039387230c648866c5ca15d381f7fee
References: #3653
|
|
|
|
|
|
|
|
|
|
|
|
| |
The docstring specified on a hybrid property or method is now honored
at the class level, allowing it to work with tools like Sphinx
autodoc. The mechanics here necessarily involve some wrapping of
expressions to occur for hybrid properties, which may cause them
to appear differently using introspection.
Fixes: #3653
Change-Id: I02549977fe8b2a051802eed7b00cc532fbc214e3
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/239
|
| |
|
|
|
|
|
|
| |
Fixes #3528
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
| |
|
| |
|
|
|
|
|
| |
for memoization on a class that uses slots.
- apply many more __slots__. mem use for nova now at 46% savings
|
| |
|
| |
|
| |
|
|
|
|
| |
to get all flake8 passing
|
| |
|
| |
|
|
|
|
|
|
|
| |
passes in AliasedInsp and allows more flexibility.
- rework the AliasedClass/AliasedInsp relationship so that AliasedInsp has
all state and functionality. AliasedClass is just a facade.
[ticket:2756]
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
associated with the ORM or its extensions can be retrieved.
This fulfills the common request of being able to inspect
all :class:`.QueryableAttribute` descriptors in addition to
extension types such as :class:`.hybrid_property` and
:class:`.AssociationProxy`. See :attr:`.Mapper.all_orm_descriptors`.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
been made as things didn't seem as bad as [ticket:2306] indicated
|
|
|
|
|
|
| |
"can't delete attribute" AttributeError when
setattr/delattr used on a hybrid that doesn't
define fset or fdel. [ticket:2353]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
of a "transformer" - a hybrid that returns a
query-transforming callable in combination
with a custom comparator. Uses a new method
on Query called with_transformation(). The use
case here is fairly experimental, but only
adds one line of code to Query.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Python 3
- Python 3 builds if Distribute isn't installed
- rework install documentation again
- raise if doc build with mako < 0.4.1
- Python 3.1 builds force doctest parse but then fails due to distribute bug,
so remove usage of backslash \\ in hybrid.py docstring
- put in the latest ez_setup.py
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
to allow execute/connection operations to participate
in the open transaction of an engine explicitly.
[ticket:1996]
- fix up the docs for connection, execute, which were awful.
- correct usage strings in hybrid
|
|
|
|
|
| |
- documentation for hybrid
- rewrite descriptor, synonym, comparable_property documentation
|
|
|
|
|
|
|
| |
more typing
on the import but this is just clearer.
- adapt dictlike-polymorphic.py to use hybrid.
|
| |
|
|
|
|
|
| |
a consistent tag
- AUTHORS file
|
| |
|
| |
|
|
|
|
| |
- move the update_wrapper to synonym for now, we can't assume the return value of hybrid.expr is an updateable wrapper
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
arg of register_descriptor to not be needed. synonym, comparable, concreteinherited
props now supply a descriptor directly in the class dict, whose
__get__(None, cls) supplies a QueryableAttribute. The basic idea is that
the hybrid prop can be used for this. Payoff here is arguable, except that
hybrid can be at the base of future synonym/comparable operations.
|
|
- mapper begins to lose awareness of SynonynmProperty, ComparableProperty
|