mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.44k stars 291 forks source link

Improve sharing of variables #1107

Open joelwiesmann opened 1 year ago

joelwiesmann commented 1 year ago

Is your feature request related to a problem? Please describe. We share the SQL code with several team members via Git. Since the code is to be executed in several environments, variables are used that are to be resolved differently depending on the runtime environment.

Currently, the variables are stored as part of the connection. Connections cannot be shared in the team because the security policy requires team members to log in with personal users. The problem here is that for SQLTools connections, the user name is a must field. If we share connection information without username configuration, a username "" is assumed and only the password is prompted.

If we cannot share the connections (or variables), users have to constantly update them by hand.

Describe the solution you'd like Allow connection profiles to be created without user names. If a connection is started without a user name, this would then be requested interactively. This would allow connection profiles to be shared with variables without credentials.

Describe alternatives you've considered Read variables not (only) from connection profiles, but also from environment variables. For example, with a syntax like

$[env:ENVIRONMENT]

or

${ENVIRONMENT}

This would make the variables feature immensely more flexible.

Additional context Variables feature https://github.com/mtxr/vscode-sqltools/pull/1064