Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

remove brackets for mssql (#15196)

Vincent Huang6f074c8822db
diff --git a/backend/api/lsp/completion.go b/backend/api/lsp/completion.go
index 785603c5b5..e48273bf9a 100644
--- a/backend/api/lsp/completion.go
+++ b/backend/api/lsp/completion.go
@@ -78,8 +78,8 @@ func (h *Handler) handleTextDocumentCompletion(ctx context.Context, _ *jsonrpc2.
var items []lsp.CompletionItem
for _, candidate := range candidates {
label := candidate.Text
- // Remove the double quote if it's quoted.
- if len(label) > 1 && label[0] == '"' && label[len(label)-1] == '"' || label[0] == '`' && label[len(label)-1] == '`' {
+ // Remove quotes or brackets from label.
+ if len(label) > 1 && (label[0] == '"' && label[len(label)-1] == '"' || label[0] == '`' && label[len(label)-1] == '`' || label[0] == '[' && label[len(label)-1] == ']') {
label = label[1 : len(label)-1]
}
completionItem := lsp.CompletionItem{