Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
variety
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
variety
Commits
e16c5427
Commit
e16c5427
authored
Apr 09, 2012
by
James Cropcho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed js file
parent
71bd68c0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
README.markdown
README.markdown
+2
-2
mongoDBSchemaAnalyzer.js
mongoDBSchemaAnalyzer.js
+1
-1
No files found.
README.markdown
View file @
e16c5427
...
@@ -12,7 +12,7 @@ We'll make a collection:
...
@@ -12,7 +12,7 @@ We'll make a collection:
So, let's see what we've got here:
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" : "_id" }, "value" : { "types" : [ "object" ] }, "totalOccurrences" : 4, "percentContaining" : 100 }
{ "_id" : { "key" : "name" }, "value" : { "types" : [ "string" ] }, "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
...
@@ -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:
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 #####
##### Dependencies #####
...
...
keys
.js
→
mongoDBSchemaAnalyzer
.js
View file @
e16c5427
...
@@ -301,7 +301,7 @@ var sortedKeys = resultsDB[resultsCollectionName].find({}).sort({totalOccurrence
...
@@ -301,7 +301,7 @@ var sortedKeys = resultsDB[resultsCollectionName].find({}).sort({totalOccurrence
sortedKeys
.
forEach
(
function
(
key
)
{
sortedKeys
.
forEach
(
function
(
key
)
{
print
(
tojson
(
key
,
''
,
true
));
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)));
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment