Skip to content

Commit 19b6e1e

Browse files
committed
sessions example
1 parent e2b8df6 commit 19b6e1e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sessions.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const addon = require('.');
2+
var res;
3+
4+
addon.Session("CREATE DATABASE IF NOT EXISTS db_xxx Engine=Atomic;", "CSV", ".")
5+
addon.Session("CREATE TABLE IF NOT EXISTS db_xxx.log_table_xxx (x String, y Int) ENGINE = Log;", "CSV", ".")
6+
addon.Session("INSERT INTO db_xxx.log_table_xxx VALUES ('a', 1), ('b', 3), ('c', 2), ('d', 5);", "CSV", ".")
7+
res = addon.Session("SELECT * FROM db_xxx.log_table_xxx LIMIT 4;", "Pretty", ".")
8+
console.log(res);
9+

0 commit comments

Comments
 (0)