Skip to content

Commit 45299b4

Browse files
committed
Optimization
1 parent 8c83bdc commit 45299b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mongodb-field-lengths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
assert options.field is not None
2121

2222
collection = common.mongodb.collection(DATABASE=options.database, name=options.collection, PORT=options.port, HOSTNAME=options.hostname)
23-
for doc in common.mongodb.findall(collection, matchfn=lambda doc: options.field in doc, matchfn_description="has field %s" % options.field):
23+
for doc in common.mongodb.findall_with_field(collection, field=options.field):
2424
print len(doc[options.field]), repr(doc[options.field])[:1000]

0 commit comments

Comments
 (0)