Skip to content

Commit d964ddb

Browse files
committed
Add chdb-go cli shortcut
1 parent 1e38a97 commit d964ddb

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,43 @@
3030
./chdb-go --path /tmp/chdb # interactive persistent mode
3131
```
3232

33+
3. Shortcuts
34+
35+
- `\l` to list databases;
36+
- `\dt dbname` to list tables in database;
37+
38+
```bash
39+
chdb-io/chdb-go [main] » ./chdb-go
40+
Enter your SQL commands; type 'exit' to quit.
41+
:) CREATE DATABASE IF NOT EXISTS testdb;
42+
43+
:) \l
44+
┏━━━━━━━━━━━━━━━━━━━━┓
45+
┃ name ┃
46+
┡━━━━━━━━━━━━━━━━━━━━┩
47+
│ INFORMATION_SCHEMA │
48+
├────────────────────┤
49+
│ _local │
50+
├────────────────────┤
51+
│ information_schema │
52+
├────────────────────┤
53+
│ system │
54+
├────────────────────┤
55+
│ testdb │
56+
└────────────────────┘
57+
58+
:) CREATE TABLE IF NOT EXISTS testdb.testtable (id UInt32) ENGINE = MergeTree()
59+
:-] ORDER BY id;
60+
61+
:) \dt testdb
62+
┏━━━━━━━━━━━┓
63+
┃ name ┃
64+
┡━━━━━━━━━━━┩
65+
│ testtable │
66+
└───────────┘
67+
68+
```
69+
3370
#### Go lib Example
3471
```go
3572
package main
@@ -62,3 +99,7 @@ func main() {
6299

63100
- See [lowApi.md](lowApi.md) for the low level APIs.
64101
- See [chdb.md](chdb.md) for high level APIs.
102+
103+
### Thanks
104+
105+
- cli implementation is based on [clickhouse-cli](https://github.com/memlimit/clickhouse-cli)

0 commit comments

Comments
 (0)