Automatically decode hex for BLOB fields.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by tracing how LiteCLI executes the shown SELECT query and how SQLite BLOB values are represented for input and display. Reproduce the notes table example, then define and test the expected behavior for both 0x-prefixed and unprefixed hex values; done means the displayed value can be used to retrieve the matching BLOB row.
Written by the indexing model from the issue text.
Description
LiteCLI has a terrific feature in which BLOB fields (e.g. used to store an UUID primary key) are automatically encoded for display as hex:
CREATE TABLE notes (
id BLOB PRIMARY KEY,
content TEXT NOT NULL
)
notes.db>
+------------------------------------+---------------------------------------------------+
| id | content |
+------------------------------------+---------------------------------------------------+
| 0x019b5525a6f878709a20d7da96f5e599 | Note the first. |
+------------------------------------+---------------------------------------------------+
However, that hex value can not be used in a query:
notes.db> select * from notes where id = '0x019b5525a6f878709a20d7da96f5e599';
0 rows in set
Time: 0.000s
notes.db> select * from notes where id = '019b5525a6f878709a20d7da96f5e599';
0 rows in set
Time: 0.000s
Please consider automatically decoding hex values used on BLOB fields.
For reference, this is what the SELECT query looks like in sqlite3:
sqlite> select id, content from notes;
+------------+---------------------------------------------------+
| id | content |
+------------+---------------------------------------------------+
| | Note the first. |
| �U%��xp� �ږ��� | |
+------------+---------------------------------------------------+
- Dominant language
- Python
- Stars
- 3.3k
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dbcli/litecli
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100