1.0.9 • Published 2 months ago

minerva-js-client v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

What is this repository for?

* Quick summary
  This library will provide some function where we can pass sql as params and get the data. As well as we can kill the runing query and get the cluster info also.

* Version : 1.0.4

Installation

npm install minerva-js-client

An implementation of minerva-js-client

import Minerva from "minerva-js-client";

const minerva = new Minerva({
      url: url,
      apikey: key,
      source: "source name",
      cluster: "selectedClusterName",
      minervaQueryTimeout: 5000
    });
    

NOTE: url, apiKey, source and cluster are required. minervaQueryTimeout is optional.

To run the query, We have to pass sql query and will get the progress of sql in callback methods

let response = minerva.query(enforcedQuery, (progress: any) => {
         console.log( progress )
      });

To cancel the running query

minerva.cancel(queryId);