dbcli / dbcli/litecli

Automatically decode hex for BLOB fields.

オープン
#244 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
3.3k
フォーク
95
PR マージ指標
30日以内にマージされた PR はありません

説明

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� �ږ��� | |
+------------+---------------------------------------------------+
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。