Skip to content

Commit 1c1e390

Browse files
authored
Update README.md
1 parent 5926b27 commit 1c1e390

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,17 @@
2121
#### Query Constructor
2222
```javascript
2323
const chdb = require('chdb-node');
24-
const db = new chdb.db('CSV', '/tmp/mysession') // format, storage path
2524
var result;
2625

2726
// Query (ephemeral)
27+
const db = new chdb.db('CSV') // format
2828
result = db.query("SELECT version()", "TabSeparated");
2929
console.log(result)
3030

3131
// Query Session (persistent)
32-
db.session("CREATE FUNCTION IF NOT EXISTS hello AS () -> 'chDB'");
33-
result = db.session("SELECT hello()", "TabSeparated");
32+
const dbdisk = new chdb.db('CSV', '/tmp/mysession') // format, storage path
33+
dbdisk.session("CREATE FUNCTION IF NOT EXISTS hello AS () -> 'chDB'");
34+
result = dbdisk.session("SELECT hello()", "TabSeparated");
3435
console.log(result)
3536
```
3637

0 commit comments

Comments
 (0)