Ferrum Marketplace

Database Runner

Vyloxi ✔ · ⬇ 1 installs · Tools

Run the selected SQL or the statement under the cursor on PostgreSQL or SQLite with the command line client, and read the result in a panel.

vyloxi.database-runner Download .fext

In Ferrum open Extensions in the sidebar, search for Database Runner and press Install. Or use Extensions: Install from File with the downloaded file.

What it adds

Commands (6)

CommandId
Database Runner: Run Statement or SelectiondbRunner.run
Database Runner: Run the Whole FiledbRunner.runFile
Database Runner: List TablesdbRunner.listTables
Database Runner: Describe a Table...dbRunner.describeTable
Database Runner: Show the First 20 Rows of a Table...dbRunner.previewTable
Database Runner: Count Rows of a Table...dbRunner.countRows

Keybindings

KeysCommand
Ctrl+Alt+EnterdbRunner.run

Settings

SettingDefaultWhat it does
dbRunner.engine'postgres'The database: postgres (psql), sqlite (sqlite3) or mysql (runs in the terminal).
dbRunner.target''PostgreSQL: a connection URL such as postgresql://user:pass@localhost:5432/mydb. SQLite: the path of the database file.
dbRunner.mysqlArgs''MySQL only: the arguments for the mysql command, for example "-h 127.0.0.1 -u root -p mydb" (-p asks for the password in the terminal).
dbRunner.timeoutSeconds30How long to wait for a result before giving up.

Code

Runs JavaScript from extension.js when: onCommand:dbRunner.run, onCommand:dbRunner.runFile, onCommand:dbRunner.listTables, onCommand:dbRunner.describeTable, onCommand:dbRunner.previewTable, onCommand:dbRunner.countRows.