Skip to content

Commit 5c71ac5

Browse files
authored
Update README.md
1 parent 5b01a10 commit 5c71ac5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,17 @@
2020
#### Query Constructor
2121
```javascript
2222
const chdb = require("chdb-node");
23-
var result;
2423

2524
// Query (ephemeral)
2625
const db = new chdb.db("CSV") // format
27-
result = db.query("SELECT version()");
28-
console.log(result)
26+
var result = db.query("SELECT version()");
27+
console.log(result) // 23.6.1.1
2928

3029
// Query Session (persistent)
3130
const dbdisk = new chdb.db("CSV", "/tmp/mysession") // format, storage path
3231
dbdisk.session("CREATE FUNCTION IF NOT EXISTS hello AS () -> 'chDB'");
33-
result = dbdisk.session("SELECT hello()", "TabSeparated"); // optional format override
34-
console.log(result)
32+
var result = dbdisk.session("SELECT hello()", "TabSeparated"); // optional format override
33+
console.log(result) // chDB
3534
```
3635

3736
#### Query _(query, format)_

0 commit comments

Comments
 (0)