only print collections starting with dbs
This commit is contained in:
parent
312f8c3cf3
commit
ff8a59125c
@ -87,11 +87,11 @@ def dbs(db, out):
|
||||
db.dbs_1.save({"foo": "bar"})
|
||||
db.dbs_2.save({"psi": "phi"})
|
||||
print >>out, db.name()
|
||||
for name in sorted(db.collection_names()):
|
||||
for name in [n for n in sorted(db.collection_names()) if n.startswith("dbs")]:
|
||||
print >>out, name
|
||||
db.drop_collection(db.dbs_1)
|
||||
db.create_collection("dbs_3")
|
||||
for name in sorted(db.collection_names()):
|
||||
for name in [n for n in sorted(db.collection_names()) if n.startswith("dbs")]:
|
||||
print >>out, name
|
||||
|
||||
def main(test, out_file):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user