diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-18 00:54:00 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-18 00:54:00 -0400 |
| commit | 515811eb582cc6d44513e19af66bf8376fd541bd (patch) | |
| tree | 4f602df9be8e5cf8e2636c06dd0c160f70c7cffd /lib/sqlalchemy/orm/properties.py | |
| parent | d2ed308da38af01e23d9f4085f6b8f973994b29a (diff) | |
| download | sqlalchemy-515811eb582cc6d44513e19af66bf8376fd541bd.tar.gz | |
- fix the labeled column with column_expression() issue, finishes [ticket:1534]
- epic documentation sweep for new operator system, making ORM links consistent
and complete, full documentation and examples for type/SQL expression feature
- type_coerce() explicitly accepts BindParamClause objects
- change UserDefinedType to coerce the other side to itself by default as this
is much more likely what's desired
- make coerce_compared_type() fully public on all types
- have profiling run the test no matter what so that the test_zoomarks don't fail
when callcounts are missing
Diffstat (limited to 'lib/sqlalchemy/orm/properties.py')
| -rw-r--r-- | lib/sqlalchemy/orm/properties.py | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index 62e4672d3..f52e914f7 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -161,6 +161,22 @@ class ColumnProperty(StrategizedProperty): dest_state._expire_attributes(dest_dict, [self.key]) class Comparator(PropComparator): + """Produce boolean, comparison, and other operators for + :class:`.ColumnProperty` attributes. + + See the documentation for :class:`.PropComparator` for a brief overview. + + See also: + + :class:`.PropComparator` + + :class:`.ColumnOperators` + + :ref:`types_operators` + + :attr:`.TypeEngine.comparator_factory` + + """ @util.memoized_instancemethod def __clause_element__(self): if self.adapter: @@ -198,9 +214,9 @@ class RelationshipProperty(StrategizedProperty): Public constructor is the :func:`.orm.relationship` function. - Of note here is the :class:`.RelationshipProperty.Comparator` - class, which implements comparison operations for scalar- - and collection-referencing mapped attributes. + See also: + + :ref:`relationship_config_toplevel` """ @@ -304,8 +320,25 @@ class RelationshipProperty(StrategizedProperty): ) class Comparator(PropComparator): - """Produce comparison operations for :func:`~.orm.relationship`-based - attributes.""" + """Produce boolean, comparison, and other operators for + :class:`.RelationshipProperty` attributes. + + See the documentation for :class:`.PropComparator` for a brief overview + of ORM level operator definition. + + See also: + + :class:`.PropComparator` + + :class:`.ColumnProperty.Comparator` + + :class:`.ColumnOperators` + + :ref:`types_operators` + + :attr:`.TypeEngine.comparator_factory` + + """ def __init__(self, prop, mapper, of_type=None, adapter=None): """Construction of :class:`.RelationshipProperty.Comparator` |
