avaticajs
v0.1.0
Published
Javascript binding for Calcite's Avatica Server
Downloads
1
Readme
Avatica JS
JavaScript connector to Calcite Avatica Server
Building
yarn install
Test
yarn test
Generating the protobuf JSON
./node_modules/protobufjs/bin/pbjs -t json \
proto/common.proto proto/requests.proto \
proto/responses.proto > lib/protobuf_bundle.json
Example
const connect = require('avaticajs')
connect('http://sql-connector-staging.waylay.io/', apiKey, apiSecret)
.then(conn => {
conn.query("select * from table(waylay.timeseries('151CF', 'lightAmbi')) limit 1000").then(
resultSet => console.log(resultSet)
conn.close()
)
}).catch(err => {
console.log("Got error:", err)
})