mongodb-js / vscode

Connect to MongoDB and Atlas and directly from your VS Code environment, navigate your databases and collections, inspect your schema and use playgrounds to prototype queries and aggregations.
https://marketplace.visualstudio.com/items?itemName=mongodb.mongodb-vscode
Apache License 2.0
317 stars 52 forks source link

Bug Report: Document Viewer doesn't display Int64 values correctly #747

Open DJSchaffner opened 1 month ago

DJSchaffner commented 1 month ago

Bug Report

Current Behavior

When viewing a document containing an Int64 value, the document viewer will display the value probably as a double ( #746 )

Code/Gist

This is the document displayed via MongoDB interface - guild_id is an Int64:

{
  "_id": {
    "$oid": "64a81216fc3208ccee8ec5f3"
  },
  "guild_id": 818617667421601852
}

This is what I see when viewing it via the plugin in VSCode:

{
  "_id": {
    "$oid": "64a81216fc3208ccee8ec5f3"
  },
  "guild_id": 818617667421601800
}

Expected Behavior/Code

Display Int64 values as they are stored in the database

Environment

Possible Solution

Additional Context/Screenshots

alenakhineika commented 1 month ago

Hey, thank you for reporting this issue! We have a dedicated ticket, VSCODE-347, that you can use to track the progress of the fix. As you correctly noted, this issue is related to the same cause, so I will be closing https://github.com/mongodb-js/vscode/issues/746 as a duplicate.