microsoft / microsoft/vscode-documentdb

Detect Document Identifiers in the JSON View

Open
#179 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
31
Forks
22
Avg merge
2d 20h
Merged PRs (30d)
21

Description

Detect Document Identifiers in the JSON View

This feature aims to enhance the JSON View by detecting _id and other configurable identifiers (such as partition key values for Cosmos DB NoSQL) from a selected document. Since different databases use varying sets of identifiers, this functionality will be configurable to adapt to specific database requirements. The feature will enable contextual operations on selected data within the JSON View.


Core Functionality
  1. Configurable Identifier Detection

    • Allow configuration of identifier types to accommodate different databases:
      • Default to detecting _id for MongoDB.
      • Support additional identifiers, such as partition keys for Cosmos DB NoSQL or other database-specific fields.
  2. Support for Various Selection Scenarios

    • Cursor Position Only: When no selection is made, determine the closest enclosing document based on the cursor position.
    • Partial Selection: Identify if the selected text falls within a document and extract the relevant identifiers.
    • Multiple Document Selection: Handle cases where multiple documents are selected, extracting identifiers for all detected documents.
  3. Enable Contextual Operations

    • Use the detected identifiers to enable operations on the selected data, such as:
      • Highlighting related entries in other views.
      • Performing targeted updates or deletions.
      • Enabling navigation to related documents or collections.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the JSON View implementation and its selection-handling code, then identify where database-specific identifier configuration belongs. Done means supporting cursor, partial, and multiple-document selections with configurable identifiers for contextual operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
databases, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.