ubquery – JSON front-end for ubdump

Name

ubquery – a JSON front end for ubdump

Synopsis

ubquery <JSON>

Description

ubquery accepts a single argument that is a JSON object and parses it to get flags for ubdump.

This is a readonly utility and cannot be used to modify a table.

It’s main use is to make it easy to extract data from Unibase from within a Javascript frontend application.

eg

unibase.dataCGI ({"PROC_NAME": "ubquery", "ARG": {"table": "customer", "key": "name", "match": "Zenucom Pty Ltd", "attribute": "[website]"}, (data) => { ...do something ...}}

It can of course be called from any script and is well suited to use with node.js

The JSON format is {“table”: “…”, “key”: “…”, “match”: “…”, “attribute”: “…”}

table is required, the others are optional.

If attribute is not given a simple dump of record(s) is returned. If attribute is given then it is a format that is passed as the “-a” flag to ubdump.