cf.Query.addattr¶
-
Query.addattr(attr)[source]¶ Return a
Queryobject with a new left hand side operand attribute to be used during evaluation. TODOIf another attribute has previously been specified, then the new attribute is considered to be an attribute of the existing attribute.
Parameters: - attr:
str The attribute name.
Returns: QueryThe new query object.
Examples:
>>> q = cf.eq(2001) >>> q <CF Query: (eq 2001)> >>> q = q.addattr('year') >>> q <CF Query: year(eq 2001)>
>>> q = cf.lt(2) >>> q = q.addattr('A') >>> q = q.addattr('B') >>> q <CF Query: A.B(lt 2)> >>> q = q.addattr('C') >>> q <CF Query: A.B.C(lt 2)>
- attr: