Commit ed1f97c83d1d556a84dbe32b93df3edc3e96d30d

Authored by Tai Tran
1 parent 40a1e5df35
Exists in master

[optimize]dont get deep in records

Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff

extract-mongo-schema.js
... ... @@ -68,7 +68,8 @@ var getSchema = function(url, opts) {
68 68 if(!docSchema[key]["types"][typeName]["structure"]) {
69 69 docSchema[key]["types"][typeName]["structure"] = {};
70 70 }
71   - getDocSchema(collectionName, doc[key], docSchema[key]["types"][typeName]["structure"]);
  71 + // dont get deep
  72 + // getDocSchema(collectionName, doc[key], docSchema[key]["types"][typeName]["structure"]);
72 73 }
73 74  
74 75 if(opts.arrayList && opts.arrayList.indexOf(typeName) !== -1) {
... ... @@ -89,7 +90,8 @@ var getSchema = function(url, opts) {
89 90 if(!docSchema[key]["types"][typeName]["structure"]["types"][typeNameArray]["structure"]) {
90 91 docSchema[key]["types"][typeName]["structure"]["types"][typeNameArray]["structure"] = {};
91 92 }
92   - getDocSchema(collectionName, doc[key][i], docSchema[key]["types"][typeName]["structure"]["types"][typeNameArray]["structure"]);
  93 + // dont get deep
  94 + // getDocSchema(collectionName, doc[key][i], docSchema[key]["types"][typeName]["structure"]["types"][typeNameArray]["structure"]);
93 95 } else {
94 96 if(!docSchema[key]["types"][typeName]["structure"]["types"][typeNameArray]) {
95 97 docSchema[key]["types"][typeName]["structure"]["types"][typeNameArray] = { frequency: 0 };