Skip to content

Commit

Permalink
v0.0.8 (#55)
Browse files Browse the repository at this point in the history
* Bumps version to 0.0.8

* chore: update README

---------

Co-authored-by: tconbeer <[email protected]>
  • Loading branch information
github-actions[bot] and tconbeer authored May 15, 2023
1 parent a469fef commit a0b9560
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 19 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.0.8] - 2023-05-15

- Cut, copy, paste in text editor with `ctrl+x`, `ctrl+c`, `ctrl+u/ctrl+v`
- Quit with `ctrl+q`, instead of `ctrl+c`
- `tab` indents selected text or inserts four-ish spaces in text editor; `shift+tab` dedents selected text
Expand Down Expand Up @@ -51,7 +53,9 @@ All notable changes to this project will be documented in this file.

- Use the DuckDB CLI.

[Unreleased]: https://github.com/tconbeer/harlequin/compare/0.0.7...HEAD
[Unreleased]: https://github.com/tconbeer/harlequin/compare/0.0.8...HEAD

[0.0.8]: https://github.com/tconbeer/harlequin/compare/0.0.7...0.0.8

[0.0.7]: https://github.com/tconbeer/harlequin/compare/0.0.6...0.0.7

Expand Down
43 changes: 26 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A Terminal-based SQL IDE for DuckDB.

## Installing Harlequin

Use `pip` or `pipx`:
After installing Python 3.8 or above, install Harlequin using `pip` or `pipx` with:

```bash
pipx install harlequin
Expand All @@ -21,9 +21,24 @@ pipx install harlequin
> - `pipx run harlequin --help`
> - `pipx run harlequin ./my.duckdb`

## Running Harlequin in a Container

Without a database file:

```bash
docker run ghcr.io/tconbeer/harlequin:latest
```

Mounting a database file `./foo.db` into the container's working directory, `/data`:

```bash
docker run -v $(pwd)/foo.db:/data/bar.db ghcr.io/tconbeer/harlequin:latest harlequin bar.db
```

## Using Harlequin

To open a DuckDB database file:
From any shell, to open a DuckDB database file:

```bash
harlequin "path/to/duck.db"
Expand All @@ -35,26 +50,20 @@ To open an in-memory DuckDB session, run Harlequin with no arguments:
harlequin
```

When Harlequin is open, you can view the schema of your DuckDB database in the left sidebar.
### Viewing the Schema of your Database

To run a query, enter your code in the main textarea, then press Ctrl+Enter. You should see the data appear in the pane below.
When Harlequin is open, you can view the schema of your DuckDB database in the left sidebar. You can use your mouse or the arrow keys + enter to navigate the tree. The tree shows schemas, tables/views and their types, and columns and their types.

You can press Tab or use your mouse to change the focus between the panes.
### Editing a Query

When the focus is on the data pane, you can use your arrow keys or mouse to select different cells.
The main query editor is a full-featured text editor, with features including syntax highlighting, auto-formatting with ``ctrl + ` ``, text selection, copy/paste, and more.

Press Ctrl+c to quit and return to your shell.
You can save the query currently in the editor with `ctrl + s`. You can open a query in any text or .sql file with `ctrl + o`.

### Running Harlequin in a Container
### Running a Query and Viewing Results

Without a database file:
To run a query, press `ctrl + enter`. Up to 50k records will be loaded into the results pane below the query editor. When the focus is on the data pane, you can use your arrow keys or mouse to select different cells.

```bash
docker run ghcr.io/tconbeer/harlequin:latest
```
### Exiting Harlequin

Mounting a database file `./foo.db` into the container's working directory, `/data`:

```bash
docker run -v $(pwd)/foo.db:/data/bar.db ghcr.io/tconbeer/harlequin:latest harlequin bar.db
```
Press `ctrl + q` to quit and return to your shell.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "harlequin"
version = "0.0.7"
version = "0.0.8"
description = "A Text User Interface for DuckDB"
authors = ["Ted Conbeer <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit a0b9560

Please sign in to comment.