diff --git a/VERSION b/VERSION
index d66f8288..d38c6b08 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-Version 2.00.0 (2012-08-25 23:06:24) dev
+Version 2.00.0 (2012-08-25 23:54:19) dev
diff --git a/gluon/dal.py b/gluon/dal.py
index f3a9a8d8..f11f22d7 100644
--- a/gluon/dal.py
+++ b/gluon/dal.py
@@ -7519,7 +7519,7 @@ class Table(dict):
yield self[fieldname]
def __repr__(self):
- return '
' % dict.__repr__(self)
+ return '' % (self._tablename,','.join(self.fields()))
def __str__(self):
if self.get('_ot', None):
@@ -8381,6 +8381,9 @@ class Query(object):
self.second = second
self.ignore_common_filters = ignore_common_filters
+ def __repr__(self):
+ return '' % BaseAdapter.expand(self.db._adapter,self)
+
def __str__(self):
return self.db._adapter.expand(self)
@@ -8437,6 +8440,9 @@ class Set(object):
query.ignore_common_filters = ignore_common_filters
self.query = query
+ def __repr__(self):
+ return '' % BaseAdapter.expand(self.db._adapter,self.query)
+
def __call__(self, query, ignore_common_filters=False):
if isinstance(query,Table):
query = query._id>0
@@ -8617,6 +8623,9 @@ class Rows(object):
self.compact = compact
self.response = rawrows
+ def __repr__(self):
+ return '' % len(self.records)
+
def setvirtualfields(self,**keyed_virtualfields):
"""
db.define_table('x',Field('number','integer'))
@@ -8877,11 +8886,27 @@ class Rows(object):
row.append(none_exception(value))
writer.writerow(row)
- def xml(self):
+ def xml(self,strict=False):
"""
serializes the table using sqlhtml.SQLTABLE (if present)
"""
-
+ if strict:
+ ncols = len(self.colnames)
+ def f(row,field='row',indent=' '):
+ if isinstance(row,dict):
+ spc = indent+' \n'
+ items = [f(row[x],x,indent+' ') for x in row]
+ return '%s<%s>\n%s\n%s%s>' % (
+ indent,
+ field,
+ spc.join(item for item in items if item),
+ indent,
+ field)
+ elif not callable(row):
+ return '%s<%s>%s%s>' % (indent,field,row,field)
+ else:
+ return None
+ return '\n%s\n' % '\n'.join(f(row) for row in self)
import sqlhtml
return sqlhtml.SQLTABLE(self).xml()