Giter Club home page Giter Club logo

gobang's Introduction

gobang

gobang is currently in alpha

A cross-platform TUI database management tool written in Rust

github workflow status crates

gobang

Features

  • Cross-platform support (macOS, Windows, Linux)
  • Multiple Database support (MySQL, PostgreSQL, SQLite)
  • Intuitive keyboard only control

TODOs

  • SQL editor
  • Custom key bindings
  • Custom theme settings
  • Support the other databases

What does "gobang" come from?

gobang means a Japanese game played on goban, a go board. The appearance of goban looks like table structure. And I live in Kyoto, Japan. In Kyoto city, streets are laid out on a grid (We call it “goban no me no youna (碁盤の目のような)”). They are why I named this project "gobang".

Installation

With Homebrew (Linux, macOS)

If you’re using Homebrew or Linuxbrew, install the gobang formula:

brew install tako8ki/tap/gobang

On Windows

If you're a Windows Scoop user, then you can install gobang from the official bucket:

scoop install gobang

On NixOS

If you're a Nix user, you can install gobang from nixpkgs:

$ nix-env --install gobang

On Archlinux

If you're an Archlinux user, you can install gobang from AUR:

paru -S gobang-bin

On NetBSD

If you're a NetBSD user, then you can install gobang from pkgsrc:

pkgin install gobang

With Cargo (Linux, macOS, Windows)

If you already have a Rust environment set up, you can use the cargo install command:

cargo install --version 0.1.0-alpha.5 gobang

From binaries (Linux, macOS, Windows)

Usage

$ gobang
$ gobang -h
USAGE:
    gobang [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --config-path <config-path>    Set the config file

If you want to add connections, you need to edit your config file. For more information, please see Configuration.

Keymap

Key Description
h, j, k, l Scroll left/down/up/right
Ctrl + u, Ctrl + d Scroll up/down multiple lines
g , G Scroll to top/bottom
H, J, K, L Extend selection by one cell left/down/up/right
y Copy a cell value
, Move focus to left/right
c Move focus to connections
/ Filter
? Help
1, 2, 3, 4, 5 Switch to records/columns/constraints/foreign keys/indexes tab
Esc Hide pop up

Configuration

The location of the file depends on your OS:

  • macOS: $HOME/.config/gobang/config.toml
  • Linux: $HOME/.config/gobang/config.toml
  • Windows: %APPDATA%/gobang/config.toml

The following is a sample config.toml file:

[[conn]]
type = "mysql"
user = "root"
host = "localhost"
port = 3306

[[conn]]
type = "mysql"
user = "root"
host = "localhost"
port = 3306
password = "password"
database = "foo"
name = "mysql Foo DB"

[[conn]]
type = "postgres"
user = "root"
host = "localhost"
port = 5432
database = "bar"
name = "postgres Bar DB"

[[conn]]
type = "sqlite"
path = "/path/to/baz.db"

Contribution

Contributions, issues and pull requests are welcome!

gobang's People

Contributors

boozec avatar codingcoffee avatar kyoto7250 avatar mi-wada avatar sho0126hiro avatar susiyaki avatar tako8ki avatar utam0k avatar znd4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gobang's Issues

support ~/database

My database resides at $HOME, it would be great if path can support ~ and $HOME and expand that to my home path.

Filtering tables with forward/backward match

I think the Filter tables table search feature of gobang only provides partial matches.

I also use Sequel Ace.app for database management. The table search function of that client is very useful for me because it allows pattern matching search when I have a lot of tables.

  • If input ^user, only table names that begin with user will be matched
  • If input user$, only table names that end with user will be matched

I would like to filter table names by forward/backward match in gobang as well, what do you think?

support connection alias

if we have multiple connections, it will be better to support connection alias to distinguish

Unable to select a table called "user"

I have a postgres database with a user table, whenever I try to select it an error screen pops up with error returned from database: syntax error at or near ".". Maybe something to do with the table name?

Upload to AUR

It would really be appreciated if you can upload this awesome program to AUR, to benefit Arch users and beyond. :)

Implement vim-like modes

Hello. It would be cool to implement vim-like mod like visual.
E.g you press shift-v and then G to select all. It is pretty natural to vim users.

SQL Server support

In our company we have some financing apps that are used for years now. The rely on the .NET Framework platform and on a SQL Server. We can put that SQL Server on a Linux machine but we are required to use a SQL Server database.

Are there any plans on supporting Microsoft SQL Server?

Ability to run more complicated query / Query tab

It would be nice to be able to run a query involving more than a single table and a where clause. This covers trivial use cases, but I would like to be able to join tables, write CTEs, and take advantage of any of my SQL vendors features by writing a query and running it. The results could show up in a table similar to the existing one.

Question: Error returned when using filter with PostgreSQL

When using Gobang with PostgreSQL, I encounter the error

error returned from database: LIMIT #, # syntax is not supported

The screenshot below described my error.

My table sec_modules contain the column id. And I type the filter expression id = 23, when press "Enter", I got the error.

Screenshot of the error:
image

I'm using Gobang installed from "gobang-0.1.0-alpha.3-x86_64-pc-windows-msvc.zip", Windows 10, and PostgreSQL 13.2.

Is there any syntax error with my filter expression? Thanks.

Add flatpak or snap support

It seems to be in the earlier stages but it would be amazing to be able to use this tool with either flatpak or snap.

pool timed out while waiting for an open connection

Discussed in #110

Originally posted by ac5tin September 15, 2021
i just installed gobang using cargo install --version 0.1.0-alpha.4 gobang

i've edited the config.toml

[[conn]]
type = "postgres"
user = "xxxxxxx"
host = "xxxxxxxxxx.us-east-1.rds.amazonaws.com"
port = 5432
database = "fastapg"

When i launch gobang and then select the connection i see the error.
2021-09-15-163059_531x179_scrot

SQL completion

  • Use reserved words as completion candidates
  • Use column names as completion candidates

Sort records by a specific column

Discussed in #122

Originally posted by ac5tin September 20, 2021
Is there a way to sort a table by a specific column? Maybe say i can use the arrow keys to go to the target column and then press s to sort?

Not able to copy cell value, maybe related to wayland?

I get an "xsel" "--clipboard": No such file or directory (os error 2) error attempting to copy a cell value with the y keybinding. I am using Sway (wayland based) window manager, which I think has a different clipboard manager interface. Any chance that is causing the issue?

Command line parameter to open an sqlite file

For inspecting some data bases it's nice to not have them be part of the config file, but be opened through a command line parameter.

Currently this can be done through a workaround:

gobang -c <(printf '[[conn]]\ntype = "sqlite"\npath = ".mozilla/firefox/abc.default/webappsstore.sqlite"\n')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.