Skip to content

Commit

Permalink
Merge pull request #7 from Vitalii4as/fix/HCK-3527
Browse files Browse the repository at this point in the history
RE: remove serialization of bson documents due to new data serialization in application
  • Loading branch information
taras-dubyk committed May 25, 2023
2 parents 6b6101d + c068343 commit 75aedaa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"versionDate": "2023-03-03",
"author": "hackolade",
"engines": {
"hackolade": "5.3.0",
"hackolade": "6.10.3",
"hackoladePlugin": "1.0.1"
},
"contributes": {
Expand Down
17 changes: 3 additions & 14 deletions reverse_engineering/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,10 @@ module.exports = {
const packageData = {
dbName,
collectionName,
documents: documents.map(serialize),
relationshipDocuments: filterPotentialForeignKeys(documents).map(serialize),
documents: documents,
relationshipDocuments: filterPotentialForeignKeys(documents),
primaryKey: '_id',
typeOfSerializer: 'bson',
standardDoc: serialize(standardDoc),
standardDoc,
validation: {
jsonSchema: getJsonSchema(documents[0]),
},
Expand All @@ -229,16 +228,6 @@ module.exports = {
}
};

const serialize = (data) => {
const b = new bson();

if (!data) {
data = {};
}

return b.serialize(data)
};

const safeParse = (data) => {
try {
return JSON.parse(data);
Expand Down
1 change: 0 additions & 1 deletion reverse_engineering/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
},
"excludeDocKind": ["id"],
"scenario": "connectToDB",
"typeOfSerializer": "bson",
"helpUrl": "https://hackolade.com/help/ConnecttoaDocumentDBinstance.html"
}

0 comments on commit 75aedaa

Please sign in to comment.