go-sqlcmd icon indicating copy to clipboard operation
go-sqlcmd copied to clipboard

Add documentation/help about supported config types

Open llskyhi opened this issue 4 months ago • 0 comments

Hi, sorry for my poor English.

I'm a newer to this sqlcmd utility, version 1.8.2, trying to use configuration files with --sqlconfig option to manage connection contexts.

Seems that sqlcmd sometimes use the configuration file's extension to determine which "config type" to use. After some rough tests, seems recognized config types are:

  • .yaml
  • .yml
  • .toml
  • .json
  • .ini
  • (maybe others?)

Using other file extensions, like .sqlconfig, running command like

sqlcmd config --sqlconfig ./myproject.sqlconfig add-endpoint --name ep1434 --address localhost --port 1434

sqlcmd will complain:

Error: Unsupported Config Type "sqlconfig"

where sqlconfig seems to be the file extension.

However, commands that read (rather than write) configuration file seem to treat the configuration file as YAML-formatted, e.g.

sqlcmd config --sqlconfig ./myproject.sqlconfig view

I'm not sure if I'm missing something, but so far I cannot find somewhere documented this behavior. Or maybe there's a plan adding a list of supported config type / a guide of naming a configuration file?

llskyhi avatar Jul 13 '25 17:07 llskyhi