Skip to content

[Feature Request]: Get connection credentials by file uri #19456

Open
@MikhailProfile

Description

@MikhailProfile

Feature Description

Since Azure data studio is retired soon, I'm trying to recreate SearchEverywhere extension for VS Code (https://github.com/MikhailProfile/SearchEverywhere)

To provide a seamless solution to users of a dependent extension I need to know current connection for any active sql document (files could have different connections in 2 different opened files).

My Pull Request #19341 was closed in reference to discussion #19411.

In a discussion there is a suggest to user getConnectionString exposed by the extension:
https://github.com/microsoft/vscode-mssql/blob/main/src/extension.ts#L113

It takes a connectionUri Or connectionDetails as input parameters. I'm bit confused because at this point I don't have any connection details or Uri on my end. Where I could get this data to get active connection for opened file?

@aasimkhan30 could you please provide details how to use it? Or consider to merge the pull request. It's a tiny change but it allows to get connection info by file uri.

@rayzinnz could you please provide your case of using getConnectionString? You mentioned that you satisfied with getConnectionString.

Thanks!

Problem and Motivation

Currently It's impossible to get active connection for opened sql file.

Related Area

  • Connection dialog
  • Query editor
  • IntelliSense/auto-completion
  • Query results panel
  • Object Explorer
  • Table Designer
  • Schema Compare
  • Schema Designer
  • Query Plan Visualizer
  • Other (please describe below)

If you selected "Other", please describe the area

Extends main extension API. New method.

Confirmation

  • I have searched existing feature requests and couldn't find a match
  • I want to help implement this feature

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions