Skip to content

voidiz/sqlfriend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sqlfriend

LSP-powered SQL line editor and REPL.

usage

$ sqlfriend
Type /help for a list of commands.
sqlfriend> /help
        /add                                - Add a new connection.
        /delete <connection_name>           - Delete a saved connection.
        /help                               - Display a list of available commands.
        /list                               - List all saved connections.
        /set_lsp_server <lsp_server>        - Set the LSP server (Sqls, SqlLs, or PgTools). Should be available in $PATH.
        /use <connection_name>              - Change the active connection.
sqlfriend> /use my_db
Connecting to my_db...
Connected to my_db.
my_db> SELECT * FROM test
 name     | age
----------+--------
 John Doe | 30
my_db>

autocompletion is triggered using <Tab>.

roadmap

  • readline with (basic) vim support (using rustyline)
  • LSP autocompletion
  • LSP diagnostics (very crude)
  • execute and print result of SQL queries (postgres, mysql, sqlite)
  • save and load database connections
  • meta-commands (such as postgres \d)
  • syntax highlighting (treesitter?)

known issues

If using sqls, auto complete won't list newly created tables until you reconnect to the database (/use).

About

LSP-powered SQL line editor and REPL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages