- changed status to wontfix
ShardedQueryShardId should have __len__
Issue #2039
resolved
I can't run len(query), so I have to do:
total = 0
for i in query:
total += 1
Which is silly. Otherwise I'm getting:
TypeError: object of type 'ShardedQueryShardId' has no len()
Comments (1)
-
repo owner - Log in to comment
you'd call
count()
, but with sharding its more complicated than that, you'd have to callcount()
on all your shard ids. Aggregates are exactly the thing you lose when you shard.Also
len()
not an option:output: