microsoft / microsoft/vscode-mssql

[GitHub Copilot - Feature request]: Database Schema Context for Inline Suggestions

Open
#21,111 0 comments 1 reaction 1 assignee Claimed by @caohai View on GitHub
Area - GitHub Copilot Enhancement
Dominant language
TypeScript
Stars
1.9k
Forks
610
Avg merge
2d 3h
Merged PRs (30d)
97

Description

### Description

Enable GitHub Copilot inline suggestions to include full context of the database schema that the user is currently connected to in the code editor. This would allow Copilot to provide accurate, schema-aware code completions when writing SQL queries and database-related code.

Currently, inline suggestions are generated based only on the content of the file being edited. For database work, this is insufficient as users need suggestions that understand their database schema (tables, columns, relationships, data types, etc.).

### Problem and Motivation

When working with databases, developers need intelligent code completion that understands the structure of their connected database. Without schema context, GitHub Copilot cannot provide accurate suggestions for:
- Table and column names
- JOIN conditions based on relationships
- WHERE clauses with proper data types
- INSERT/UPDATE statements with correct column lists
- Complex queries that follow the database's naming conventions and structure

Other tools have already implemented this functionality:
- **Fabric team**: Enabled schema-aware completions in their code editor
- **SSMS team**: Implemented similar database context features
- **DataGrip**: Uses cloud-based code completion that leverages database context to offer precise suggestions matching user style and naming conventions

This enhancement would bring the MSSQL extension's GitHub Copilot integration to parity with these competing tools and significantly improve developer productivity.

### Affected Area

- [ ] Agent mode
- [ ] Ask mode
- [ ] Slash commands
- [ ] Code generation
- [ ] Connection management
- [x] Schema exploration and object management
- [ ] Query execution and performance advisor
- [ ] Other (please describe below)

### If you selected "Other", please describe the affected area

_No response_

### Environment Information (Optional)

- VS Code: Latest
- MSSQL extension: Latest

### Confirmation

- [x] I have searched existing issues and couldn’t find a match
- [ ] I want to work on this issue

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.