Skip to content

Commit b4ab0eb

Browse files
authored
Update README.md
1 parent 1c41bf7 commit b4ab0eb

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
- experimental, unstable, subject to changes
1313
- requires [`libchdb`](https://github.com/metrico/libchdb) on the system
1414

15+
- :wave: _C/Node developer? Jump in and help us evolve this prototype into a stable module!_
16+
17+
<br>
18+
1519
#### Example
1620
##### Query _(query, format)_
1721
```javascript
@@ -23,11 +27,18 @@ console.log(result) // 23.6.1.1
2327
##### Session _(query, *format, *path)_
2428
```javascript
2529
const chdb = require('chdb-node');
26-
chdb.Session("CREATE FUNCTION IF NOT EXISTS hello AS () -> 'chDB'", "CSV", "/tmp/)
27-
var result = = chdb.Session("SELECT hello();", "CSV", "/tmp/)
30+
chdb.Session("CREATE FUNCTION IF NOT EXISTS hello AS () -> 'chDB'")
31+
var result = = chdb.Session("SELECT hello();")
2832
console.log(result) // chDB
2933
```
3034

35+
Sessions persist table data to disk. You can specify the `path` and `format`:
36+
```javascript
37+
chdb.Session("CREATE FUNCTION IF NOT EXISTS hello AS () -> 'chDB'", "CSV", "/tmp/)
38+
```
39+
40+
⚠️ _Session folders are persistent and NOT automatically cleaned_
41+
3142
<br>
3243
33-
:wave: _C/Node developer? Jump in and help us evolve this prototype into a stable module!_
44+

0 commit comments

Comments
 (0)