Skip to content

pasca-l/database-connection-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database Connection Manager

Local database connection manager.

Requirements

  • Go 1.24

Usage

  1. Build binary for command (file will be generated under ./bin/dbcm by default).
$ make build
  1. (optional) Add path to bin file.
  • if not set, call the command directly by its path, eg. ./bin/dbcm.
$ export PATH=$PWD/bin:$PATH
  1. Use the command to manage local database connections.
  • compatible with: postgresql, mysql
# for the first time, initialize file to store managing states
$ dbcm init

# add connection to management
$ dbcm add test psql -h localhost -d testdb -u user -w pw

# connect to database by given name
$ dbcm connect test

# show connections and sessions
$ dbcm ls
$ dbcm sessions

Run on development mode

  1. Set up docker containers.
$ make start
  1. Enter docker container with database client.
$ make client
  1. Use the dbcm command.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published