Skip to content

Commit

Permalink
sessions example
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani committed Jul 31, 2023
1 parent e2b8df6 commit 19b6e1e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sessions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const addon = require('.');
var res;

addon.Session("CREATE DATABASE IF NOT EXISTS db_xxx Engine=Atomic;", "CSV", ".")
addon.Session("CREATE TABLE IF NOT EXISTS db_xxx.log_table_xxx (x String, y Int) ENGINE = Log;", "CSV", ".")
addon.Session("INSERT INTO db_xxx.log_table_xxx VALUES ('a', 1), ('b', 3), ('c', 2), ('d', 5);", "CSV", ".")
res = addon.Session("SELECT * FROM db_xxx.log_table_xxx LIMIT 4;", "Pretty", ".")
console.log(res);

0 comments on commit 19b6e1e

Please sign in to comment.