Skip to content
This repository was archived by the owner on Dec 25, 2023. It is now read-only.

Commit 0d5c22e

Browse files
committed
Use chdb-go-cli
1 parent 78e88aa commit 0d5c22e

File tree

4 files changed

+1
-369
lines changed

4 files changed

+1
-369
lines changed

LICENSE

-201
This file was deleted.

README.md

+1-72
Original file line numberDiff line numberDiff line change
@@ -1,72 +1 @@
1-
<img src="https://github.com/chdb-io/chdb/raw/main/docs/_static/snake-chdb.png" width=300>
2-
3-
[![PyPI](https://img.shields.io/pypi/v/chdb.svg)](https://pypi.org/project/chdb/)
4-
[![Downloads](https://static.pepy.tech/badge/chdb)](https://pepy.tech/project/chdb)
5-
[![Discord](https://img.shields.io/discord/1098133460310294528?logo=Discord)](https://discord.gg/Njw5YXSPPc)
6-
7-
# chDB-CLI
8-
Simple CLI / REPL for [chdb](https://chdb.io) made in Python
9-
10-
#### Setup
11-
```bash
12-
wget https://raw.githubusercontent.com/chdb-io/chdb-cli/main/chdb-cli.py -O chdb-cli
13-
chmod +x chdb-cli
14-
```
15-
#### Usage
16-
By default, chDB-cli will create a temporary, self-cleaning database folder for your data.<br>
17-
To open or create a persistent database, simply include a database folder path as a command line argument.
18-
19-
##### Temporary DB Folder
20-
```
21-
./chdb-cli
22-
```
23-
24-
```sql
25-
26-
Connected to auto-clean temporary database.
27-
CTRL-D to Exit. ESC+ENTER or ; to Run.
28-
CHDB VERSION: 0.11.5
29-
30-
:) SELECT 'hello chdb', version() as version;
31-
┏━━━━━━━━━━━━━━┳━━━━━━━━━━┓
32-
'hello chdb' ┃ version ┃
33-
┡━━━━━━━━━━━━━━╇━━━━━━━━━━┩
34-
│ hello chdb │ 23.6.1.1
35-
└──────────────┴──────────┘
36-
```
37-
38-
##### Custom DB Folder
39-
```
40-
./chdb-cli /tmp/chdb
41-
```
42-
```sql
43-
Connected to local database /tmp/chdb
44-
CTRL-D to Exit. ESC+ENTER or ; to Run.
45-
CHDB VERSION: 0.11.5
46-
47-
:) CREATE DATABASE IF NOT EXISTS db_xxx ENGINE = Atomic;
48-
49-
:) CREATE TABLE IF NOT EXISTS db_xxx.log_table_xxx (x String, y Int) ENGINE = Log;
50-
51-
:) INSERT INTO db_xxx.log_table_xxx VALUES ('a', 1), ('b', 3), ('c', 2), ('d', 5);
52-
53-
:) CREATE VIEW db_xxx.view_xxx AS SELECT * FROM db_xxx.log_table_xxx LIMIT 4;
54-
55-
:) SELECT * FROM db_xxx.view_xxx;
56-
57-
┏━━━┳━━━┓
58-
┃ x ┃ y ┃
59-
┡━━━╇━━━┩
60-
│ a │ 1
61-
├───┼───┤
62-
│ b │ 3
63-
├───┼───┤
64-
│ c │ 2
65-
├───┼───┤
66-
│ d │ 5
67-
└───┴───┘
68-
```
69-
70-
#### CLI Screenshot
71-
72-
![image](https://github.com/chdb-io/chdb-cli/assets/1423657/97a4fca0-ad8c-4c67-bc33-6f406656adb3)
1+
### Use [chdb-go-cli](https://github.com/chdb-io/chdb-go) instead

chdb-cli.py

-93
This file was deleted.

requirements.txt

-3
This file was deleted.

0 commit comments

Comments
 (0)