More tests on table

This commit is contained in:
Friedrich Lindenberg
2013-04-01 19:56:14 +02:00
parent 8a97902762
commit 7c5779da80
2 changed files with 28 additions and 0 deletions
+4
View File
@@ -122,6 +122,10 @@ class Table(object):
for row in rows:
yield row
def __len__(self):
d = self.database.query(self.table.count()).next()
return d.values().pop()
def distinct(self, *columns, **kw):
qargs = []
try: