1.0.2 • Published 2 years ago

modern-query-engine v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years 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.2

How do I get set up?

npm install modern-query-engine

To configuration, We have to import init() from the library and pass the following object in the parameters.

const queryConfig = { minervaUrl: URL, querySubmitTimeout: 15000, nextUriTimeout: 100, minervaRoutingGroup: "", minervaClusterName: "minervab", userID : "" };

init(queryConfig);

NOTE: only minervaUrl && userID is required.

To run the query we have to import query function from library and pass three params one is the apikey and second is query text and third one is callback function to get progress of running of query

let { columns, queryInfo, cluster, data } = query(apiKey, query, (progress: any) => { });

To kill running query, we have to import killQuery function from library and pass the two params one is the progress object and second is apiKey

killQuery(queryProgress, apiKey);