File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2121#### Query Constructor
2222``` javascript
2323const chdb = require (' chdb-node' );
24- const db = new chdb.db (' CSV' , ' /tmp/mysession' ) // format, storage path
2524var result;
2625
2726// Query (ephemeral)
27+ const db = new chdb.db (' CSV' ) // format
2828result = db .query (" SELECT version()" , " TabSeparated" );
2929console .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" );
3435console .log (result)
3536```
3637
You can’t perform that action at this time.
0 commit comments