Vscode-sqltools: how to edit connection json manually?

Created on 16 Oct 2019  路  7Comments  路  Source: mtxr/vscode-sqltools

The docs suggest that to add any extra pgOptions (e.g. setting ssl to true) we should manually edit the connection json

https://vscode-sqltools.mteixeira.dev/connections/aws-redshift

How do we do this? There doesn't appear to be any way to modify the json from the Connection Assistant.

Thanks!

3rd party blocking docs

All 7 comments

C:\Users\\AppData\Roaming\Code\User\settings.json
Bothered me too hope it helps

Thanks! I ended up doing the same thing you probably did (putting a file change monitor on my laptop, saving the file, and locating it that way).

@maintainers it would be super helpful to show the location of settings.json in the Connection Assistant.

Also recommend explicitly showing ssl example in the docs, e.g.

"pgOptions": {
"ssl": true
}

Since that's a VERY common option (probably needed for the majority of connections, especially to things like Redshift). Great work on this extension BTW.

Thanks @sstirlin .

I've s tarted working on this, see: https://github.com/mtxr/vscode-sqltools/compare/open-settings

About ssl options, it already existis in the docs.

This open settings will be release in a few days after testing, ok?

Sounds great! I'll let you close the issue. Thanks

Useful info: https://code.visualstudio.com/docs/getstarted/settings#_settings-file-locations

Requirements:

  1. Have a button in the assistant to go to the settings file
  2. Add an entry in the explorer context menu to go to settings file
  3. when creating connections, show option to go to setting only after connection is created, otherwise we don't know where the connections is

Vscode doesn't provide api to progamatically find current settings file.
I could find a solution that works in 2 fo 3 possible setups.

Currently we can have tree places where it can be stored, global settings (easy to find), workspace folder settings(usually .vscode/settings.json) and workspace files, and for workspace files, it can be created anywhere, we don't have a standard for that, I can create a workspace files in my home directory that uses directories from any path.

I'll add this to the docs here and I'll open an issue in vscode repo.

Found a temporary solution. We still can't got directly to the file, but we take user to vscode settings screen, from there we can go to the correct file..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ransagy picture ransagy  路  7Comments

steffan-c picture steffan-c  路  7Comments

BrendanSimon picture BrendanSimon  路  3Comments

cstyve picture cstyve  路  3Comments

glha picture glha  路  7Comments