Show More
@@ -911,6 +911,10 b' class SqlalchemyOrmWrapper(object):' | |||
|
911 | 911 | return self.collection[range] |
|
912 | 912 | |
|
913 | 913 | def __len__(self): |
|
914 | # support empty types, without actually making a query. | |
|
915 | if self.collection is None or self.collection == []: | |
|
916 | return 0 | |
|
917 | ||
|
914 | 918 | # Count the number of objects in an sqlalchemy.orm.query.Query object |
|
915 | 919 | return self.collection.count() |
|
916 | 920 |
General Comments 0
You need to be logged in to leave comments.
Login now