queryit

A very basic setupless terminal based SQL query runner meant to be used as a developer tool to test queries against a project database.

Build Status AUR

Queryit

A very basic setupless terminal based SQL query runner meant to be used as a developer tool to test queries against a project database.

Screenshot

Installation

if ArchLinux

There's an AUR package for it.

$ yay -S queryit

else

You need the project dependencies installed on your system:

$ make
$ sudo make install

Usage

On a rails or amber project directory just run it, a connection will be made to the development database:

$ queryit

Or specify the database URI:

$ queryit --uri postgres://localhost/database

Database support

Despite of only be really tested with Postgres and SQLite, it should work with MySQL too.

Contributing

  1. Fork it (https://github.com/hugopl/queryit/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Feature suggestions are welcome, write them in github issues.

Contributors

Unreleased

Changed

  • TextUI module (code used to render the UI) moved to its own shard.

Fix

  • Do not print a stacktrace when passing a invalid parameter.
  • Save last used query in the same place for postgres://host/db and postgresql://host/db.

[0.5.0] - 2020-01-03

Added

  • Syntax highlighting!!
  • When query editor focused, CTRL+L clear editor.
  • When query editor focused, CTRL+/ comment/uncomment lines.
  • Show query excetuion time and number of rows in result set.
  • Page up/down can be used to scroll results table.
  • Page up/down can be used on query editor.
  • Query editor is now scrollable.

Fix

  • Adjust selected item on viewport on database list widget.
  • Do not re-render list widget on each key press.

[0.4.0] - 2019-12-17

Added

  • New fancy border box style.
  • Render focused boxes with different colors.
  • Cycle focus on TAB key.
  • Show full result value when ENTER key is pressed on results table.
  • Save editor contents per database URI at exit.

[0.3.0] - 2019-12-09

Added

  • Show EXPLAIN queries as a text in result box.
  • Improved query editor: Show line numbers, has word wrap and a decent cursor navigation.
  • SQL beautifier implemented, still not perfect, but helps!

[0.2.1] - 2019-11-18

  • User version_from_shard v1.0.0.

[0.2.0] - 2019-11-18

Added

  • Detect Amber project configuration.

Changed

  • Show SQL errors on results table instead of the status bar.

Fix

  • SQLite3 databases now works.
  • Results table navigation should work.
  • Let the SQL editor empty at start.

[0.1.0] - 2019-11-07

  • First release, only basic things working but still useful.
  • Support for SQLite and MySQL is there, but never tested.
  • Postgres is the only one tested for now.
Github statistic:
  • 4
  • 1
  • 0
  • 2
  • 0
  • 1 day ago

License:

MIT License

Links: