From 0233c6e0bf024686d5d838ed4df832035e87a2dd Mon Sep 17 00:00:00 2001 From: Konsta Vesterinen Date: Wed, 13 Nov 2013 08:54:37 +0200 Subject: [PATCH] Added doc block --- sqlalchemy_utils/aggregates.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sqlalchemy_utils/aggregates.py b/sqlalchemy_utils/aggregates.py index 9bb44b7..fa84610 100644 --- a/sqlalchemy_utils/aggregates.py +++ b/sqlalchemy_utils/aggregates.py @@ -431,6 +431,18 @@ def aggregated( relationship, column ): + """ + Decorator that generates an aggregated attribute. The decorated function + should return an aggregate select expression. + + :param relationship: + Defines the relationship of which the aggregate is calculated from. + The class needs to have given relationship in order to calculate the + aggregate. + :param column: + SQLAlchemy Column object. The column definition of this aggregate + attribute. + """ def wraps(func): return AggregatedAttribute( func,