Skip to content

fix escaped names for import and apply #109

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

Merged
merged 1 commit into from
Jul 1, 2025
Merged

Conversation

sdseaton
Copy link
Contributor

@sdseaton sdseaton commented Jul 1, 2025

This pull request simplifies the handling of database names in KustoSchemaHandler.cs by removing unnecessary escaping logic and ensuring consistent usage of the databaseName parameter. The changes improve code readability and reduce redundant operations.

@Copilot Copilot AI review requested due to automatic review settings July 1, 2025 14: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.

Pull Request Overview

This PR simplifies the handling of database names in KustoSchemaHandler.cs by removing the extra escaping logic for the databaseName parameter.

  • Removed the unnecessary use of BracketIfIdentifier() in both Import and Apply methods.
  • Updated logging and database handler instantiation to consistently use the unescaped databaseName.
Comments suppressed due to low confidence (1)

KustoSchemaTools/KustoSchemaHandler.cs:111

  • The removal of the identifier escaping assumes that databaseName is safe for direct use. Please confirm that all database names are prevalidated or sanitized elsewhere to avoid issues with special characters.
            var dbHandler = KustoDatabaseHandlerFactory.Create(clusters.Connections[0].Url, databaseName);

@sdseaton sdseaton merged commit 8fed24a into main Jul 1, 2025
4 checks passed
@sdseaton sdseaton deleted the bugfix/escaped_apply branch July 1, 2025 14:18
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.

2 participants