Skip to content

Commit

Permalink
📝 add overview to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeelvalley committed Dec 9, 2023
1 parent 8b97fc6 commit b44fd93
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ node_modules
node_modules
oclif.lock
oclif.manifest.json
/prisma/app.db
/prisma/app.db-journal
/prisma/sqlq.db
/prisma/sqlq.db-journal
/sample.db
44 changes: 38 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

A little CLI for working with databases during development for quick queries and automation

# Usage

Install the CLI from NPM using your fave package manager. If you don't have a fave, just use `npm`:

```sh
npm install --global sqlq
```

Then, you should be able to view the application help using:

```sh
sqlq help
```

The flow for using the application is as follows:

1. Create a connection to a database using `sqlq connection create` and follow the instructions. This stores the database config so you can connect and use it
2. Once you have a connection, you can run queries against it using the `sqlq query sql` or `sqlq query file` subcommands
3. You can also store queries to run by name using the `sqlq tool` subcommand set
4. The application stores previous queries which can be accessed using `sqlq history`. You can repeat these queries using their ID with `sqlq query history`

# Supported Databases

Currently the application should work fine with:

1. SQLite
2. PostgreSQL
3. Microsoft SQL Server

> Contributions welcome for additional database support
# Goals

- [x] Manage list of connections
Expand All @@ -15,13 +46,14 @@ A little CLI for working with databases during development for quick queries and
- [ ] Run a parameterized query using a CSV for multiple inputs?

<!-- commands -->

# 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
* [`sqlq yeet`](docs/yeet.md) - Run a query via connection string. Not saved in history.
- [`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
- [`sqlq yeet`](docs/yeet.md) - Run a query via connection string. Not saved in history.

<!-- commandsstop -->
2 changes: 1 addition & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ generator client {

datasource db {
provider = "sqlite"
url = "file:./app.db"
url = "file:./sqlq.db"
}

model Connection {
Expand Down

0 comments on commit b44fd93

Please sign in to comment.