Commit e16c5427 by James Cropcho

renamed js file

parent 71bd68c0
......@@ -12,7 +12,7 @@ We'll make a collection:
So, let's see what we've got here:
$ mongo test --eval "var collection = 'users'" keys.js
$ mongo test --eval "var collection = 'users'" mongoDBSchemaAnalyzer.js
{ "_id" : { "key" : "_id" }, "value" : { "types" : [ "object" ] }, "totalOccurrences" : 4, "percentContaining" : 100 }
{ "_id" : { "key" : "name" }, "value" : { "types" : [ "string" ] }, "totalOccurrences" : 4, "percentContaining" : 100 }
......@@ -42,7 +42,7 @@ Perhaps you want to ignore a collection's oldest documents, and only see what th
One can apply a "limit" constraint, which analyzes only the newest documents in a collection, like so:
$ mongo test --eval "var collection = 'users', limit = 500" keys.js
$ mongo test --eval "var collection = 'users', limit = 500" mongoDBSchemaAnalyzer.js
##### Dependencies #####
......
......@@ -301,7 +301,7 @@ var sortedKeys = resultsDB[resultsCollectionName].find({}).sort({totalOccurrence
sortedKeys.forEach(function(key) {
print(tojson(key, '', true));
print(sprintf("%.3f%% \t%s\t\t%s", key.percentContaining, key["_id"].key, tojson(key.value.types)));
// print(sprintf("%.3f%% \t%s\t\t%s", key.percentContaining, key["_id"].key, tojson(key.value.types)));
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment