UNIBASE

ubquery: A guide to the 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 read-only 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 you do not give the attribute, ubdump returns a simple dump of record(s). If you give the attribute, ubdump uses the attribute value as the format for the ‘-a’ flag.

Verified by MonsterInsights