--- a/rset.py Fri Apr 16 14:39:42 2010 +0200
+++ b/rset.py Fri Apr 16 16:40:25 2010 +0200
@@ -15,21 +15,22 @@
class ResultSet(object):
- """A result set wraps a RQL query result. This object implements a partial
- list protocol to allow direct use as a list of result rows.
+ """A result set wraps a RQL query result. This object implements
+ partially the list protocol to allow direct use as a list of
+ result rows.
:type rowcount: int
- :ivar rowcount: number of rows in the result
+ :param rowcount: number of rows in the result
:type rows: list
- :ivar rows: list of rows of result
+ :param rows: list of rows of result
:type description: list
- :ivar description:
+ :param description:
result's description, using the same structure as the result itself
:type rql: str or unicode
- :ivar rql: the original RQL query string
+ :param rql: the original RQL query string
"""
def __init__(self, results, rql, args=None, description=(), cachekey=None,
rqlst=None):
@@ -204,7 +205,8 @@
return rset
def split_rset(self, keyfunc=None, col=0, return_dict=False):
- """splits the result set in multiple result set according to a given key
+ """splits the result set in multiple result sets according to
+ a given key
:type keyfunc: callable(entity or FinalType)
:param keyfunc:
@@ -252,7 +254,7 @@
return result
def limited_rql(self):
- """return a printable rql for the result set associated to the object,
+ """returns a printable rql for the result set associated to the object,
with limit/offset correctly set according to maximum page size and
currently displayed page when necessary
"""
@@ -377,12 +379,14 @@
@cached
def get_entity(self, row, col):
- """special method for query retreiving a single entity, returns a
+ """convenience method for query retrieving a single entity, returns a
partially initialized Entity instance.
- WARNING: due to the cache wrapping this function, you should NEVER
- give row as a named parameter (i.e. rset.get_entity(req, 0)
- is OK but rset.get_entity(row=0, req=req) isn't
+ .. warning:
+
+ Due to the cache wrapping this function, you should NEVER
+ give row as a named parameter (i.e. rset.get_entity(req, 0)
+ is OK but rset.get_entity(row=0, req=req) isn't)
:type row,col: int, int
:param row,col: