File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 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
2529const 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();" )
2832console .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+
You can’t perform that action at this time.
0 commit comments