summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/descriptor_props.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-08-18 00:54:00 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-08-18 00:54:00 -0400
commit515811eb582cc6d44513e19af66bf8376fd541bd (patch)
tree4f602df9be8e5cf8e2636c06dd0c160f70c7cffd /lib/sqlalchemy/orm/descriptor_props.py
parentd2ed308da38af01e23d9f4085f6b8f973994b29a (diff)
downloadsqlalchemy-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/descriptor_props.py')
-rw-r--r--lib/sqlalchemy/orm/descriptor_props.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/descriptor_props.py b/lib/sqlalchemy/orm/descriptor_props.py
index 91717974d..f4c2e1a90 100644
--- a/lib/sqlalchemy/orm/descriptor_props.py
+++ b/lib/sqlalchemy/orm/descriptor_props.py
@@ -73,7 +73,17 @@ class DescriptorProperty(MapperProperty):
class CompositeProperty(DescriptorProperty):
+ """Defines a "composite" mapped attribute, representing a collection
+ of columns as one attribute.
+ :class:`.CompositeProperty` is constructed using the :func:`.composite`
+ function.
+
+ See also:
+
+ :ref:`mapper_composite`
+
+ """
def __init__(self, class_, *attrs, **kwargs):
self.attrs = attrs
self.composite_class = class_
@@ -279,6 +289,23 @@ class CompositeProperty(DescriptorProperty):
return self.comparator_factory(self)
class Comparator(PropComparator):
+ """Produce boolean, comparison, and other operators for
+ :class:`.CompositeProperty` attributes.
+
+ See the example in :ref:`composite_operations` for an overview
+ of usage , as well as the documentation for :class:`.PropComparator`.
+
+ See also:
+
+ :class:`.PropComparator`
+
+ :class:`.ColumnOperators`
+
+ :ref:`types_operators`
+
+ :attr:`.TypeEngine.comparator_factory`
+
+ """
def __init__(self, prop, adapter=None):
self.prop = self.property = prop
self.adapter = adapter