npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

webapi-active-query-builder-web-client

v1.0.3

Published

Ready-to-use JavaScript library that helps to implement **ad-hoc SQL query builder** for non-technical end users. It uses **Active Query Builder Web API**, a cloud service for SQL query creation, analysis and modification.

Downloads

5

Readme

Web Client for Active Query Builder Web API

Ready-to-use JavaScript library that helps to implement ad-hoc SQL query builder for non-technical end users. It uses Active Query Builder Web API, a cloud service for SQL query creation, analysis and modification.

Compatibility

Web browser | Internet Explorer | Chrome | Firefox | Opera | Safari --------------- | ----------------- | ------ | ------- | ----- | ------ Minimal version | 10 | 23 | 21 | 15 | 6

Description

Web Client for Active Query Builder Web API is designed for the purpose of building full-featured web interface to work with result data of arbitrary SQL query. The component acts like Online Visual Query Builder: it allows your end-users to sort, filter and browse paginated data, by modifying the given SQL query according to user instructions.

Remarks

The idea of this web client was to let the web users to browse data from large datasets using a full-featured interactive user interface to browse massive data sets while passing a minimum amount of data to the client. This is not another one HTML data grid control. You can use any third-party grid controls (which allow for the necessary customization) with Active Query Builder API or create your own one. This library lets send the user's query modification instructions to the server and receive data in return in an easy way.

This library also provides a handy HTML control to manage filter conditions in a tree-like form.

Learn more at https://webapi.activequerybuilder.com.

Getting started

How to initialize the QueryTransformer control?

QueryTransformer requires a URL of the server access point to be passed to the constructor:

var queryTransformer = new ActiveQueryBuilder.QueryTransformer("http://localhost:53489");
How to initialize Criteria Builder control?

To display the Criteria Builder control, call the QueryTransformer.criteriaBuilder.init method and pass the id of the container HTML element as a parameter:

queryTransformer.criteriaBuilder.init("html_element_id");
How to link the QueryTransformer object to the grid control?

Pass the user's actions to appropriate methods of the QueryTransformer class and call the QueryTransformer.transform method to send commands to the server. Handle the QueryTransformer.dataReceived event to display data in return.

Read more details and find code samples in remarks for the QueryTransformer class and it's helper classes.

How to configure the web server to work with the component?

In order to operate with this library, a server access point that's capable to handle the following requests is necessary.

Request | Parameters | Return value | Description --------------- | ------------- | ---------------- | ------------- GetQueryColumns | - | ColumnList | Returns list of query columns. TransformSql | Transform | | Gets transformation commands from the client and returns data to be displayed.

ColumnList and Transform are JSON-encoded string of the structure described on the Active Query Builder API Definition page. See the Active Query Builder Web API HTML Demo page to find sample of these handlers.

Class reference

Classes

Class name | Description ---------- | ----------- QueryTransformer | Non-visual object to exchange data with the server. Gets list of columns from the server and sends transformation directives to the server. CriteriaBuilder | Visual control to define conditions by the end-user. Filter | Helper class of the QueryTransformer to work with sortings. Sorting | Helper class of the QueryTransformer to work with sortings. HiddenColumn | Helper class of the QueryTransformer to show/hide columns. Pagination | Helper class of the QueryTransformer to work with pagination. Total | Helper class of the QueryTransformer to work with totals. Column | Represents single query column. AggregatedColumn | Defines aggregation for a column. SortedColumn | Defines sorting for a column. FilterCondition | Defines single condition for a column. FilterConditionGroup | Defines group of conditions.


Enumerations

Enumeration | Description ----------- | ----------- junctionTypes | Lists all possible junction types to be used to join conditions. aggregateFunctions | Lists all possible aggregate functions that can be used to calculate totals. conditionalOperators | Lists all possible conditional operators to be used to build conditions. sortDirections | Lists all possible sort directions.