Skip to content
/ usql Public
forked from xo/usql

usql is a universal command-line interface for SQL databases

License

Notifications You must be signed in to change notification settings

kod3r/usql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About usql

usql is a universal command-line interface for working with SQL databases.

usql provides a universal command line interface for the following databases: PostgreSQL, MySQL, Oracle, SQLite, and Microsoft SQL Server.

The goal is to eventually have usql be a drop in replacement for PostgreSQL's psql command, with all the bells/whistles, but with the added benefit of working with more than one database.

Installing

Install in the usual Go way:

# install usql
$ go get -u github.com/knq/usql

# install with oracle support
$ go get -u -tags oracle github.com/knq/usql

Using

# display command line arguments
$ usql --help

# connect to a postgres database
$ usql pg://user:pass@localhost/dbname

# connect to a sqlite file
$ usql file:dbname.sqlite3

Example Output

The following is an example of connecting to xo's booktest example Oracle database, performing a query, and then connecting to the PostgreSQL, MySQL, Microsoft SQL Server, and SQLite3 databases and executing various queries.

TODO

  • Better handling of local files (such as unix domain sockets) for Handler.Open
  • All the various \d* commands from psql
  • SQL completion

About

usql is a universal command-line interface for SQL databases

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 91.4%
  • Shell 7.1%
  • PLpgSQL 1.5%