diff --git a/packages/web/src/utility/clipboard.ts b/packages/web/src/utility/clipboard.ts index 2a870c25..6d82b50a 100644 --- a/packages/web/src/utility/clipboard.ts +++ b/packages/web/src/utility/clipboard.ts @@ -192,7 +192,7 @@ export const copyRowsFormatDefs = { }, mongoInsert: { label: 'Copy as Mongo INSERTs', - name: 'Mongo UPDATEs', + name: 'Mongo INSERTs', formatter: clipboardMongoInsertFormatter(), }, }; diff --git a/plugins/dbgate-plugin-mongo/src/backend/driver.js b/plugins/dbgate-plugin-mongo/src/backend/driver.js index 3d86cd8a..7a91af6c 100644 --- a/plugins/dbgate-plugin-mongo/src/backend/driver.js +++ b/plugins/dbgate-plugin-mongo/src/backend/driver.js @@ -135,12 +135,16 @@ const driver = { }); try { options.info({ - message: JSON.stringify(resValue), + message: `Result: ${JSON.stringify(resValue)}`, time: new Date(), severity: 'info', }); } catch (err) { - console.log('Result cannot be stringified'); + options.info({ + message: `Result: ${resValue}`, + time: new Date(), + severity: 'info', + }); } const arrayRes = findArrayResult(resValue);