Skip to content

Commit b5c67ec

Browse files
authored
Update README.md
1 parent a3800f6 commit b5c67ec

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,19 @@
1313
- requires [`libchdb`](https://github.com/metrico/libchdb) on the system
1414

1515
#### Example
16+
##### Query _(query, format)_
1617
```javascript
1718
const chdb = require('chdb-node');
1819
var result = chdb.Execute('SELECT version()', 'CSV');
19-
console.log(result) // 22.12.1.1
20+
console.log(result) // 23.6.1.1
21+
```
22+
23+
##### Session _(query, *format, *path)_
24+
```javascript
25+
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/)
28+
console.log(result) // chDB
2029
```
2130

2231
<br>

0 commit comments

Comments
 (0)