Skip to content

Commit

Permalink
add support for Vertica
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Gerler <[email protected]>
  • Loading branch information
baron42bba committed Dec 22, 2023
1 parent 9f95511 commit 34850de
Show file tree
Hide file tree
Showing 5 changed files with 898 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ sqls aims to provide advanced intelligence for you to edit sql in your own edito
- PostgreSQL([pgx](https://github.com/jackc/pgx))
- SQLite3([go-sqlite3](https://github.com/mattn/go-sqlite3))
- MSSQL([go-mssqldb](https://github.com/denisenkom/go-mssqldb))
- Vertica([vertica-sql-go](https://github.com/vertica/vertica-sql-go))

### Language Server Features

Expand Down Expand Up @@ -72,6 +73,7 @@ go get github.com/lighttiger2505/sqls
- [sqls.vim](https://github.com/lighttiger2505/sqls.vim)
- [vscode-sqls](https://github.com/lighttiger2505/vscode-sqls)
- [sqls.nvim](https://github.com/nanotee/sqls.nvim)
- [Emacs LSP SQLS](https://emacs-lsp.github.io/lsp-mode/page/lsp-sqls/)

## DB Configuration

Expand Down Expand Up @@ -122,6 +124,9 @@ connections:
user: sshuser
passPhrase: ssspass
privateKey: /home/lighttiger2505/.ssh/id_rsa
- alias: dsn_vertica
driver: vertica
dataSourceName: vertica://user:pass@host:5433/dbname
```

### Workspace configuration Sample
Expand Down
5 changes: 5 additions & 0 deletions dialect/keyword.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ const (
DatabaseDriverSQLite3 DatabaseDriver = "sqlite3"
DatabaseDriverMssql DatabaseDriver = "mssql"
DatabaseDriverOracle DatabaseDriver = "oracle"
DatabaseDriverVertica DatabaseDriver = "vertica"
)

func DataBaseKeywords(driver DatabaseDriver) []string {
Expand All @@ -407,6 +408,8 @@ func DataBaseKeywords(driver DatabaseDriver) []string {
return mssqlKeywords
case DatabaseDriverOracle:
return oracleKeyWords
case DatabaseDriverVertica:
return verticaKeywords
default:
return sqliteKeywords
}
Expand All @@ -430,6 +433,8 @@ func DataBaseFunctions(driver DatabaseDriver) []string {
return []string{}
case DatabaseDriverOracle:
return oracleReservedWords
case DatabaseDriverVertica:
return verticaReservedWords
default:
return []string{}
}
Expand Down
Loading

0 comments on commit 34850de

Please sign in to comment.