{"id":13481792,"url":"https://github.com/sqls-server/sqls","last_synced_at":"2026-01-06T16:20:40.955Z","repository":{"id":37838872,"uuid":"218044081","full_name":"sqls-server/sqls","owner":"sqls-server","description":"SQL language server written in Go.","archived":false,"fork":false,"pushed_at":"2025-10-30T05:09:01.000Z","size":2434,"stargazers_count":1201,"open_issues_count":53,"forks_count":80,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-11-10T05:18:21.721Z","etag":null,"topics":["autocomplete","language-server","language-server-protocol","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sqls-server.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-28T12:42:18.000Z","updated_at":"2025-11-08T12:00:12.000Z","dependencies_parsed_at":"2023-12-29T17:31:35.939Z","dependency_job_id":"5c3e1956-2670-45b8-a102-5d2632dafc30","html_url":"https://github.com/sqls-server/sqls","commit_stats":null,"previous_names":["sqls-server/sqls","lighttiger2505/sqls"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/sqls-server/sqls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqls-server%2Fsqls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqls-server%2Fsqls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqls-server%2Fsqls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqls-server%2Fsqls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sqls-server","download_url":"https://codeload.github.com/sqls-server/sqls/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqls-server%2Fsqls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27671928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-11T02:00:11.302Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocomplete","language-server","language-server-protocol","sql"],"created_at":"2024-07-31T17:00:55.749Z","updated_at":"2025-12-11T22:44:11.172Z","avatar_url":"https://github.com/sqls-server.png","language":"Go","readme":"# sqls: SQL Language Server\n\n![test](https://github.com/sqls-server/sqls/workflows/test/badge.svg)\n\nAn implementation of the Language Server Protocol for SQL.\n\n## Note\n\nThis project is currently under development and there is no stable release. Therefore, destructive interface changes and configuration changes are expected.\n\n## Features\n\nsqls aims to provide advanced intelligence for you to edit sql in your own editor.\n\n### Support RDBMS\n\n- MySQL([Go-MySQL-Driver](https://github.com/go-sql-driver/mysql))\n- PostgreSQL([pgx](https://github.com/jackc/pgx))\n- SQLite3([go-sqlite3](https://github.com/mattn/go-sqlite3))\n- MSSQL([go-mssqldb](https://github.com/denisenkom/go-mssqldb))\n- H2([pgx](https://github.com/CodinGame/h2go))\n- Vertica([vertica-sql-go](https://github.com/vertica/vertica-sql-go))\n\n### Language Server Features\n\n#### Auto Completion\n\n![completion](./imgs/sqls-completion.gif)\n\n- DML(Data Manipulation Language)\n    - [x] SELECT\n        - [x] Sub Query\n    - [x] INSERT\n    - [x] UPDATE\n    - [x] DELETE\n- DDL(Data Definition Language)\n    - [ ] CREATE TABLE\n    - [ ] ALTER TABLE\n\n#### Join completion\nIf the tables are connected with a foreign key sqls can complete ```JOIN``` statements\n\n![join_completion](imgs/sqls-fk_joins.gif)\n\n#### CodeAction\n\n![code_actions](https://github.com/sqls-server/sqls.vim/blob/master/imgs/sqls_vim_demo.gif)\n\n- [x] Execute SQL\n- [ ] Explain SQL\n- [x] Switch Connection(Selected Database Connection)\n- [x] Switch Database\n\n#### Hover\n\n![hover](./imgs/sqls_hover.gif)\n\n#### Signature Help\n\n![signature_help](./imgs/sqls_signature_help.gif)\n\n#### Document Formatting\n\n![document_format](./imgs/sqls_document_format.gif)\n\n## Installation\n\n```shell\ngo install github.com/sqls-server/sqls@latest\n```\n\n## Editor Plugins\n\n- [sqls.vim](https://github.com/sqls-server/sqls.vim)\n- [vscode-sqls](https://github.com/lighttiger2505/vscode-sqls)\n- [sqls.nvim](https://github.com/nanotee/sqls.nvim)\n- [Emacs LSP mode](https://emacs-lsp.github.io/lsp-mode/page/lsp-sqls/)\n\n## DB Configuration\n\nThe connection to the RDBMS is essential to take advantage of the functionality provided by `sqls`.\nYou need to set the connection to the RDBMS.\n\n### Configuration Methods\n\nThere are the following methods for RDBMS connection settings, and they are prioritized in order from the top.\nWhichever method you choose, the settings you make will remain the same.\n\n1. Configuration file specified by the `-config` flag\n1. `workspace/configuration` set to LSP client\n1. Configuration file located in the following location\n    - `$XDG_CONFIG_HOME`/sqls/config.yml (\"`$HOME`/.config\" is used instead of `$XDG_CONFIG_HOME` if it's not set)\n\n### Configuration file sample\n\n```yaml\n# Set to true to use lowercase keywords instead of uppercase.\nlowercaseKeywords: false\nconnections:\n  - alias: dsn_mysql\n    driver: mysql\n    dataSourceName: root:root@tcp(127.0.0.1:13306)/world\n  - alias: individual_mysql\n    driver: mysql\n    proto: tcp\n    user: root\n    passwd: root\n    host: 127.0.0.1\n    port: 13306\n    dbName: world\n    params:\n      autocommit: \"true\"\n      tls: skip-verify\n  - alias: mysql_via_ssh\n    driver: mysql\n    proto: tcp\n    user: admin\n    passwd: Q+ACgv12ABx/\n    host: 192.168.121.163\n    port: 3306\n    dbName: world\n    sshConfig:\n      host: 192.168.121.168\n      port: 22\n      user: sshuser\n      passPhrase: ssspass\n      privateKey: /home/sqls-server/.ssh/id_rsa\n  - alias: dsn_vertica\n    driver: vertica\n    dataSourceName: vertica://user:pass@host:5433/dbname\n```\n\n### Workspace configuration Sample\n\n- setting example with vim-lsp.\n\n```vim\nif executable('sqls')\n    augroup LspSqls\n        autocmd!\n        autocmd User lsp_setup call lsp#register_server({\n        \\   'name': 'sqls',\n        \\   'cmd': {server_info-\u003e['sqls']},\n        \\   'whitelist': ['sql'],\n        \\   'workspace_config': {\n        \\     'sqls': {\n        \\       'connections': [\n        \\         {\n        \\           'driver': 'mysql',\n        \\           'dataSourceName': 'root:root@tcp(127.0.0.1:13306)/world',\n        \\         },\n        \\         {\n        \\           'driver': 'postgresql',\n        \\           'dataSourceName': 'host=127.0.0.1 port=15432 user=postgres password=mysecretpassword1234 dbname=dvdrental sslmode=disable',\n        \\         },\n        \\       ],\n        \\     },\n        \\   },\n        \\ })\n    augroup END\nendif\n```\n\n- setting example with coc.nvim.\n\nIn `coc-settings.json` opened by `:CocConfig`\n\n```json\n{\n    \"languageserver\": {\n        \"sql\": {\n            \"command\": \"sqls\",\n            \"args\": [\"-config\", \"$HOME/.config/sqls/config.yml\"],\n            \"filetypes\": [\"sql\"],\n            \"shell\": true\n        }\n    }\n}\n```\n\n- setting example with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sqls).\n\n```lua\nrequire'lspconfig'.sqls.setup{\n  on_attach = function(client, bufnr)\n    require('sqls').on_attach(client, bufnr) -- require sqls.nvim\n  end\n  settings = {\n    sqls = {\n      connections = {\n        {\n          driver = 'mysql',\n          dataSourceName = 'root:root@tcp(127.0.0.1:13306)/world',\n        },\n        {\n          driver = 'postgresql',\n          dataSourceName = 'host=127.0.0.1 port=15432 user=postgres password=mysecretpassword1234 dbname=dvdrental sslmode=disable',\n        },\n      },\n    },\n  },\n}\n```\n\n- Setting example for Sublime Text 4\n\n  Install the LSP Client by Opening the command palette and run ```Package Control: Install Package```, then select ```LSP```.\n\n  Open ```Preferences \u003e Package Settings \u003e LSP \u003e Settings``` and add the ```\"sqls\"``` client configuration to the ```\"clients\"```:\n```\n{\n    \"show_diagnostics_count_in_view_status\": true,\n    \"clients\": {\n        \"sqls\": {\n            \"enabled\": true,\n            \"command\": [\"/path/to/sqls binary\"],\n            \"selector\": \"source.sql\"\n        }\n    }\n}\n```\n\n**I'm sorry. Please wait a little longer for other editor settings.**\n\n### Configuration Parameters\n\nThe first setting in `connections` is the default connection.\n\n| Key         | Description          |\n| ----------- | -------------------- |\n| connections | Database connections |\n\n### connections\n\n`dataSourceName` takes precedence over the value set in `proto`, `user`, `passwd`, `host`, `port`, `dbName`, `params`.\n\n| Key            | Description                                 |\n| -------------- | ------------------------------------------- |\n| alias          | Connection alias name. Optional.            |\n| driver         | `mysql`, `postgresql`, `sqlite3`, `mssql`, `h2`. Required. |\n| dataSourceName | Data source name.                           |\n| proto          | `tcp`, `udp`, `unix`.                       |\n| user           | User name                                   |\n| passwd         | Password                                    |\n| host           | Host                                        |\n| port           | Port                                        |\n| path           | unix socket path                            |\n| dbName         | Database name                               |\n| params         | Option params. Optional.                    |\n| sshConfig      | ssh config. Optional.                       |\n\n#### sshConfig\n\n| Key        | Description                 |\n| ---------- | --------------------------- |\n| host       | ssh host. Required.         |\n| port       | ssh port. Required.         |\n| user       | ssh user. Optional.         |\n| privateKey | private key path. Required. |\n| passPhrase | passPhrase. Optional.       |\n\n#### DSN (Data Source Name)\n\nSee also.\n\n- \u003chttps://github.com/go-sql-driver/mysql#dsn-data-source-name\u003e\n- \u003chttps://pkg.go.dev/github.com/jackc/pgx/v4\u003e\n- \u003chttps://github.com/mattn/go-sqlite3#connection-string\u003e\n\n## Contributors\n\nThis project exists thanks to all the people who contribute.\n\u003ca href=\"https://github.com/sqls-server/sqls/graphs/contributors\"\u003e\n    \u003cimg src=\"https://contrib.rocks/image?repo=sqls-server/sqls\" /\u003e\n\u003c/a\u003e\n\n## Inspired\n\nI created sqls inspired by the following OSS.\n\n- [dbcli Tools](https://github.com/dbcli)\n    - [mycli](https://www.mycli.net/)\n    - [pgcli](https://www.pgcli.com/)\n    - [litecli](https://litecli.com/)\n- non-validating SQL parser\n    - [sqlparse](https://github.com/andialbrecht/sqlparse)\n","funding_links":[],"categories":["Go","Integrations"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqls-server%2Fsqls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqls-server%2Fsqls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqls-server%2Fsqls/lists"}