Skip to content

SQL Layer External dependenciesλ︎

Linting and formatting of SQL queries is supported via externally installed binaries.

SQL layer and LSP page documents installation of an LSP Server binary for the SQL layer

SQLint Linting toolλ︎

The sqlint tool provides SQL syntax checking in Emacs via Flycheck.

Install ruby and the sqlint gem.

gem install sqlint

Add Git pre-commit hookλ︎

When committing queries it is useful to define a Git pre-commit hook to check the syntax of the query before the commit completes

If using pre-commit to manage hooks, edit the Git .pre-commit-hooks.yaml

- repo:
  rev: master
  - id: sqlint

SQLfmt formatting toolλ︎

Formatting: Install sqlfmt and move it into your $PATH

Download and extract the binary 0.4.0 for linux

wget -q -O - | tar -xpvzf - --directory "${installdir}/bin"