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 #####
......@@ -59,4 +59,4 @@ Much thanks also, to Kyle Banker ([@Hwaet] (https://twitter.com/#!/hwaet)) for w
I every reason to believe this tool will **not** corrupt your data or harm your computer. But if I were you, I would not use it in a production environment.
Released by Maypop Inc, © 2012, under the [MIT License] (http://www.opensource.org/licenses/MIT).
\ No newline at end of file
Released by Maypop Inc, © 2012, under the [MIT License] (http://www.opensource.org/licenses/MIT).
......@@ -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