Skip to content

SQL (sqls)#

Server#

For more information about the LSP server, check sqls.

Installation#

go get github.com/lighttiger2505/sqls

Debugger: Not available#

Sample configuration:#

(setq lsp-sqls-connections
    '(((driver . "mysql") (dataSourceName . "yyoncho:local@tcp(localhost:3306)/foo"))
      ((driver . "postgresql") (dataSourceName . "host=127.0.0.1 port=5432 user=yyoncho password=local dbname=sammy sslmode=disable"))))

After you have started the server you have pick server connection and database via M-x lsp-execute-code-action (or corresponding M-x lsp-sqls-*) command.

Available configurations#

lsp-sqls-connections#

Type: (repeat (alist :key-type (choice (const :tag Driver driver) (const :tag Connection String dataSourceName)) :value-type string))

Default: nil

The connections to the SQL server(s).


lsp-sqls-server#

Type: file

Default: sqls

Path to the sqls binary.


lsp-sqls-timeout#

Type: number

Default: 0.5

Timeout to use for sqls requests.


lsp-sqls-workspace-config-path#

Type: (choice (const workspace) (const root))

Default: workspace

If non-nil then setup workspace configuration with json file path.



Last update: September 19, 2021