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
038a7b3c
Commit
038a7b3c
authored
Apr 09, 2012
by
James Cropcho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed _id.* issue
parent
0b876838
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
TODO
TODO
+4
-2
mongoDBSchemaAnalyzer.js
mongoDBSchemaAnalyzer.js
+13
-0
No files found.
TODO
View file @
038a7b3c
is 'limit' broken?
add explanation of 'limit' results
to readme: contribuing/report issues etc
general cleanup
to readme: contribuing/report issues etc, req: system js must be permissible
make public
make public
mongoDBSchemaAnalyzer.js
View file @
038a7b3c
...
@@ -94,6 +94,8 @@ var resultsDB = db.getMongo().getDB("schemaAnalyzerResults");
...
@@ -94,6 +94,8 @@ var resultsDB = db.getMongo().getDB("schemaAnalyzerResults");
var
numDocuments
=
db
[
collection
].
count
();
var
numDocuments
=
db
[
collection
].
count
();
var
blackListKeys
=
[
"_id.equals"
,
"_id.getTimestamp"
,
"_id.isObjectId"
,
"_id.str"
,
"_id.tojson"
];
resultsDB
[
resultsCollectionName
].
find
({}).
forEach
(
function
(
key
)
{
resultsDB
[
resultsCollectionName
].
find
({}).
forEach
(
function
(
key
)
{
keyName
=
key
[
"_id"
].
key
;
keyName
=
key
[
"_id"
].
key
;
...
@@ -102,6 +104,17 @@ resultsDB[resultsCollectionName].find({}).forEach(function(key) {
...
@@ -102,6 +104,17 @@ resultsDB[resultsCollectionName].find({}).forEach(function(key) {
return
;
return
;
}
}
var
blackListKeyFound
=
false
;
blackListKeys
.
forEach
(
function
(
blackListKey
)
{
if
(
keyName
===
blackListKey
)
{
resultsDB
[
resultsCollectionName
].
remove
({
"_id"
:
{
key
:
keyName
}});
blackListKeyFound
=
true
;
}
});
if
(
blackListKeyFound
)
{
return
;
}
if
(
!
(
keyName
.
match
(
/
\.
XX/
)
&&
!
keyName
.
match
(
/
\.
XX$/
)))
{
if
(
!
(
keyName
.
match
(
/
\.
XX/
)
&&
!
keyName
.
match
(
/
\.
XX$/
)))
{
var
existsQuery
=
{};
var
existsQuery
=
{};
existsQuery
[
keyName
]
=
{
$exists
:
true
};
existsQuery
[
keyName
]
=
{
$exists
:
true
};
...
...
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