dblab

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2021 License: MIT Imports: 1 Imported by: 0

README

dblab

Interactive client for PostgreSQL and MySQL.

Release integration tests unit tests

Overview

dblab is a fast and lightweight interactive terminal based UI application for PostgreSQL and MySQL, written in Go and works on OSX, Linux and Windows machines. Main idea behind using Go for backend development is to utilize ability of the compiler to produce zero-dependency binaries for multiple platforms. dblab was created as an attempt to build very simple and portable application to work with local or remote PostgreSQL/MySQL databases.

Features

  • Cross-platform support OSX/Linux/Windows 32/64-bit
  • Simple installation (distributed as a single binary)
  • Zero dependencies

Installation

Help

dblab is a terminal UI based interactive database client for Postgres, MySQL and SQLite.

Usage:
  dblab [flags]
  dblab [command]

Available Commands:
  help        Help about any command
  version     The version of the project

Flags:
      --config string   config file (default is $HOME/.dblab.yaml)
      --db string       Database name
      --driver string   Database driver
  -h, --help            help for dblab
      --host string     Server host name or IP
      --pass string     Password for user
      --port string     Server port
      --ssl string      SSL mode
  -u, --url string      Database connection string
      --user string     Database user

Use "dblab [command] --help" for more information about a command.

Usage

dblab --host localhost --user myuser --db users --pass password --ssl disable --port 5432 --driver postgres

Connection URL scheme is also supported:

db --url postgres://user:password@host:port/database?sslmode=[mode]
db --url mysql://user:password@tcp(host:port)/db

If the query panel is active, type the desired query and press Enter to see the results on the rows panel below. Otherwise, you might me located at the tables panel, then you can navigate by using the arrows Up and Down. If you want to see the rows of a table, press Enter.

Key Bindings
Key Description
Ctrl+Space If the query panel is active, execute the query
Enter If the tables panel is active, list all the rows as a result set on the rows panel
Ctrl+h Toggle to the panel on the left
Ctrl+j Toggle to the panel below
Ctrl+k Toggle to the panel above
Ctrl+l Toggle to the panel on the right
Arrow Up Next row of the result set, on the rows panel. Next table on the tables panel
Arrow Down Previous row of the result set, on the rows panel. Previous table on the tables panel
Ctrl+c Quit

Contribute

  • Fork this repository
  • Create a new feature branch for a new functionality or bugfix
  • Commit your changes
  • Execute test suite
  • Push your code and open a new pull request
  • Use issues for any questions
  • Check wiki for extra documentation

License

The MIT License (MIT). See LICENSE file for more details.

Documentation

Overview

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
cmd
db
pkg
app
gui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL