Commit 038a7b3c by James Cropcho

fixed _id.* issue

parent 0b876838
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
...@@ -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};
......
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