Skip to content

Commit

Permalink
Add alternate text on images
Browse files Browse the repository at this point in the history
It makes images (a bit) more accessible.
  • Loading branch information
dbaty committed Feb 10, 2025
1 parent 23f7728 commit 3e77c83
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion content/pages/0.index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ highlighting.
* Source: https://github.com/dbcli/pgcli

.. image:: {filename}/images/image01.png
:alt: Screenshot
:alt: Screenshot of pgcli showing SQL output and auto-completion on table names
:width: 750px

Quick Start
Expand Down
27 changes: 21 additions & 6 deletions content/pages/completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,43 @@ Here are a few examples of smart completion.

Only table names from the current database are suggested after the FROM keyword.

<img src="images/docs/table.png" width=750 align="center">
.. image:: images/docs/table.png
:alt: Screenshot of pgcli auto-completion on table names in `select * from ‸`
:width: 750px
:align: center

### Column

Column names from the current table are suggested after the WHERE clause.

<img src="images/docs/column.png" width=750 align="center">
.. image:: images/docs/column.png
:alt: Screenshot of pgcli auto-completion on column names in `select * from django_site where ‸`
:width: 750px
:align: center

### Insert
### Insert

Insert statement will suggest the column names.

<img src="images/docs/insert.png" width=750 align="center">
.. image:: images/docs/insert.png
:alt: Screenshot of pgcli auto-completion in `insert into django_site values (‸`
:width: 750px
:align: center

### Alias

Aliases in the query are resolved and the columns from the table aliases are suggested.

<img src="images/docs/alias.png" width=750 align="center">
.. image:: images/docs/alias.png
:alt: Screenshot of pgcli auto-completion on aliases tables in `select * from django_site d join auth_group a on d.‸`
:width: 750px
:align: center

## Fuzzy Match

The completions are matched using a [fuzzy algorithm](http://blog.amjith.com/fuzzyfinder-in-10-lines-of-python). For example typing 'djmi' will match the table 'django_migrations' because 'djmi' has parts of matching substrings. Here's an example:

<img src="images/docs/fuzzy.png" width=750 align="center">
.. image:: images/docs/fuzzy.png
:alt: Screenshot of pgcli auto-completion with fuzzy matching in `select * from aup‸` that proposes 'auth_permission', 'auth_group', etc.
:width: 750px
:align: center

0 comments on commit 3e77c83

Please sign in to comment.