Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding schema diagram api. #2435

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

aasimkhan30
Copy link
Contributor

Sends a json representation of tables and foreign key relationships.

@aasimkhan30 aasimkhan30 requested review from Copilot, Benjin and kburtram and removed request for Copilot January 8, 2025 21:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • src/Microsoft.SqlTools.ServiceLayer/HostLoader.cs: Evaluated as low risk
  • src/Microsoft.SqlTools.ServiceLayer/SchemaDesigner/Contracts/GetSchemaModelRequest.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)

src/Microsoft.SqlTools.ServiceLayer/SchemaDesigner/SchemaDesignerService.cs:300

  • [nitpick] Returning null in the catch block without proper handling can lead to null reference exceptions. Consider throwing a specific exception or handling the error more explicitly.
return null;

@aasimkhan30 aasimkhan30 requested a review from Copilot January 8, 2025 21:30

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • src/Microsoft.SqlTools.ServiceLayer/HostLoader.cs: Evaluated as low risk
  • src/Microsoft.SqlTools.ServiceLayer/SchemaDesigner/Contracts/GetSchemaModelRequest.cs: Evaluated as low risk
Comments suppressed due to low confidence (3)

src/Microsoft.SqlTools.ServiceLayer/SchemaDesigner/SchemaDesignerService.cs:185

  • [nitpick] The variable name 'randomUri' is not descriptive. Consider renaming it to 'newConnectionUri'.
string randomUri = Guid.NewGuid().ToString();

src/Microsoft.SqlTools.ServiceLayer/SchemaDesigner/SchemaDesignerService.cs:100

  • [nitpick] The error message 'Failed to get schema information' is too generic. Consider providing more specific details about the failure.
var columnResult = await RunSimpleQuery(connectionCompleteParams, requestParams.DatabaseName, columnQuery) ?? throw new Exception("Failed to get schema information");

src/Microsoft.SqlTools.ServiceLayer/SchemaDesigner/SchemaDesignerService.cs:304

  • Ensure that the behavior for handling the 'MapOnAction' method is covered by tests.
internal static OnAction MapOnAction(string action)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant