@@ -121,6 +121,7 @@ def where_clause(self):
121121 def make_sql (self , fields = None ):
122122 """
123123 Make the SQL SELECT statement.
124+
124125 :param fields: used to explicitly set the select attributes
125126 """
126127 return "SELECT {distinct}{fields} FROM {from_}{where}" .format (
@@ -323,6 +324,7 @@ def __add__(self, other):
323324 def proj (self , * attributes , ** named_attributes ):
324325 """
325326 Projection operator.
327+
326328 :param attributes: attributes to be included in the result. (The primary key is already included).
327329 :param named_attributes: new attributes computed or renamed from existing attributes.
328330 :return: the projected expression.
@@ -481,6 +483,7 @@ def aggr(self, group, *attributes, keep_all_rows=False, **named_attributes):
481483 """
482484 Aggregation of the type U('attr1','attr2').aggr(group, computation="QueryExpression")
483485 has the primary key ('attr1','attr2') and performs aggregation computations for all matching elements of `group`.
486+
484487 :param group: The query expression to be aggregated.
485488 :param keep_all_rows: True=keep all the rows from self. False=keep only rows that match entries in group.
486489 :param named_attributes: computations of the form new_attribute="sql expression on attributes of group"
@@ -510,6 +513,7 @@ def head(self, limit=25, **fetch_kwargs):
510513 """
511514 shortcut to fetch the first few entries from query expression.
512515 Equivalent to fetch(order_by="KEY", limit=25)
516+
513517 :param limit: number of entries
514518 :param fetch_kwargs: kwargs for fetch
515519 :return: query result
@@ -520,6 +524,7 @@ def tail(self, limit=25, **fetch_kwargs):
520524 """
521525 shortcut to fetch the last few entries from query expression.
522526 Equivalent to fetch(order_by="KEY DESC", limit=25)[::-1]
527+
523528 :param limit: number of entries
524529 :param fetch_kwargs: kwargs for fetch
525530 :return: query result
@@ -561,6 +566,7 @@ def __contains__(self, item):
561566 """
562567 returns True if the restriction in item matches any entries in self
563568 e.g. ``restriction in q1``.
569+
564570 :param item: any restriction
565571 (item in query_expression) is equivalent to bool(query_expression & item) but may be
566572 executed more efficiently.
@@ -907,6 +913,7 @@ def aggr(self, group, **named_attributes):
907913 """
908914 Aggregation of the type U('attr1','attr2').aggr(group, computation="QueryExpression")
909915 has the primary key ('attr1','attr2') and performs aggregation computations for all matching elements of `group`.
916+
910917 :param group: The query expression to be aggregated.
911918 :param named_attributes: computations of the form new_attribute="sql expression on attributes of group"
912919 :return: The derived query expression
0 commit comments