dbcon

command module
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

dbcon

Build Status Coverage Status GoDevDoc Time Tracker Code lines Comments

Web-based SQL console to SQLite, MySQL and Postgres.

Install

go install github.com/vearutop/dbcon@latest
$(go env GOPATH)/bin/dbcon --help

Or download binary from releases.

Linux AMD64
wget https://github.com/vearutop/dbcon/releases/latest/download/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz
./dbcon -version
Macos Intel
wget https://github.com/vearutop/dbcon/releases/latest/download/darwin_amd64.tar.gz && tar xf darwin_amd64.tar.gz && rm darwin_amd64.tar.gz
codesign -s - ./dbcon
./dbcon -version
Macos Apple Silicon (M1, etc...)
wget https://github.com/vearutop/dbcon/releases/latest/download/darwin_arm64.tar.gz && tar xf darwin_arm64.tar.gz && rm darwin_arm64.tar.gz
codesign -s - ./dbcon
./dbcon -version

Usage

Usage of dbcon:
dbcon [OPTIONS] DB...
        DB can be a path to SQLite file, or a URL with mysql:// or postgres:// scheme. Examples:
                postgres://user:password@localhost/dbname?sslmode=disable
                mysql://user:password@localhost/dbname
                sqlite:///my.db
                my.sqlite
  -listen string
        listen address, port 0 picks a free random port (default "127.0.0.1:0")
  -s    skip browser opening

Multiple statements can be separated with ;.

If a statement has -- plot in comment, result is plotted on a chart.

First column is used for X axis, remaining columns go to Y axis.

X-axis can be a UTC datetime if values are UNIX timestamp integers and statement has a comment -- plot:time.

If a statement has -- pie in comment, result is rendered as a pie chart.

First column is used for the numeric value of pie slice, second is a label.

Pie total is calculated as sum of all values, for cases of partial pie you can provide the total with -- pie:total=123.

Example

Documentation

Overview

Package main is an example CLI app.

Directories

Path Synopsis
Package app provides importable main.
Package app provides importable main.
Package dbcon provides HTTP API.
Package dbcon provides HTTP API.
internal
graceful
Package graceful orchestrates shutdown gracefully.
Package graceful orchestrates shutdown gracefully.

Jump to

Keyboard shortcuts

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