What it adds
Commands (6)
| Command | Id |
|---|---|
| Database Runner: Run Statement or Selection | dbRunner.run |
| Database Runner: Run the Whole File | dbRunner.runFile |
| Database Runner: List Tables | dbRunner.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
| Keys | Command |
|---|---|
| Ctrl+Alt+Enter | dbRunner.run |
Settings
| Setting | Default | What 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.timeoutSeconds | 30 | How 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.