8000 GitHub - epitron/sqlsh: A CLI that lets you manipulate SQL databases/tables like a filesystem (eg: ls, mkdir, cp, mv, etc.)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

epitron/sqlsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Shell (A shell for your SQL!)

Lets you navigate your SQL databases as if they were directories. Use familiar commands like "cd", "ls", "rm", "mkdir", and "mv" to list/rename/remove/create databases, tables, and columns.

Also lets you execute queries on databases using Ruby's Sequel syntax.

sqlsh screenshot

Usage

sqlsh.rb mysql://<username>:<password>@<hostname>/

Planned Features

Commands

  • "open" command (auto-prompt for username/password)
  • "rm" command (drop database/table/column/index)
  • "mkdir" or "new" command (creates databases, tables, and columns)
  • "mv" or "rename" (for table, column, etc.)
  • "edit " pops up a curses dialog w/ types and stuff (nano/vim/pico?)
  • "ls -l" shows {db: sizes/tables, table: columns/types/indexes, column: ? }

Refactoring

  • Steal jed's display-in-colums thingy
  • Browser#for(path) returns a new browser in that path
    • ls("/what/lala") is implemented by @browser.for("/what/lala").ls
    • can all commands work without "use"?
    • #context method uses path info, not "USE"
  • option parser
  • path parser (make paths the standard db interface)
    • path.up
    • path.database_name
    • path.=
    • path.table_name
    • path.column_name

Ideas

  • remember last connection and auto-connect next session
  • less-style results (scroll left/right/up/down)
  • make a reuslt object that can display in short (column)
  • pager for long results (less?)
  • assigning result sets, and _ for last set (history of results?)
  • browser.root = argv[0]
  • log sql commands without ugly timestamps
  • a way to do joins (set intersection?)
    • table1<=column=>table2
  • compact table display mode (truncate) fields
  • use URI (or addressable) to parse uris
  • bookmarks

About

A CLI that lets you manipulate SQL databases/tables like a filesystem (eg: ls, mkdir, cp, mv, etc.)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0