diff --git a/README.md b/README.md index ea26b23..41c0f07 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,36 @@ A simple CLI for working with databases during development for quick queries and automation +# Table of contents + + + +- [SQLQ](#sqlq) +- [Table of contents](#table-of-contents) +- [Command Topics](#command-topics) +- [Goals](#goals) + + + + +# Command Topics + +- [`sqlq connection`](docs/connection.md) - Create a connection to a database +- [`sqlq help`](docs/help.md) - Display help for sqlq. +- [`sqlq history`](docs/history.md) - Delete a history entry +- [`sqlq query`](docs/query.md) - Query data from a database by file +- [`sqlq tool`](docs/tool.md) - Create a tool + + + # Goals - [x] Manage list of connections -- [ ] Manage list of common queries with an alias -- [ ] Manage/migrate own internal DB in the real app using diesel (auto migration support lacking) +- [x] Manage list of common queries with an alias +- [x] Manage/migrate own internal DB in the real app (TBC, should work) - [ ] Support different output formats, e.g. CSV/JSON/Table View - [ ] Figure out how to distribute the thing - [ ] Support terminal based UI for doing all of the application features - [ ] On the fly creation of databases - SQLite, maybe others + + diff --git a/docs/connection.md b/docs/connection.md new file mode 100644 index 0000000..4c519ad --- /dev/null +++ b/docs/connection.md @@ -0,0 +1,133 @@ +`sqlq connection` +================= + +Create a connection to a database + +* [`sqlq connection create ALIAS DRIVER CONNECTIONSTRING [DESCRIPTION]`](#sqlq-connection-create-alias-driver-connectionstring-description) +* [`sqlq connection delete ALIAS`](#sqlq-connection-delete-alias) +* [`sqlq connection get ALIAS`](#sqlq-connection-get-alias) +* [`sqlq connection list [SEARCH]`](#sqlq-connection-list-search) +* [`sqlq connection ls [SEARCH]`](#sqlq-connection-ls-search) + +## `sqlq connection create ALIAS DRIVER CONNECTIONSTRING [DESCRIPTION]` + +Create a connection to a database + +``` +USAGE + $ sqlq connection create ALIAS DRIVER CONNECTIONSTRING [DESCRIPTION] [--format js|table|json|csv] + +ARGUMENTS + ALIAS Alias for connection + DRIVER (mssql|sqlite|pg) The type of driver to use when working to the database + CONNECTIONSTRING Connection string for database + DESCRIPTION Description of connection + +FLAGS + --format=