The Shortcut drawer is where to use and manage commonly used UQL commands, including preset shortcuts and custom shortcuts.
Create Node and Edge
Click the New Node or New Edge under Create, a pop-up window for inserting new node or edge will show:
These shortcuts of metadata insertion do not support to specify
_id
or_uuid
, they will be automatically generated by system. If you need to specify_id
or_uuid
, please write theinsert()
command in the UQL Editor.
Preset UQL Plugin
Ultipa Manager offers some preset UQL plugins, which are all commonly used query commands, such as find nodes, find edges, K-hop neighbor query, AB path query, and auto-spread.
Click any plugin under UQL Plugin, a pop-up windows will show for you to configure parameters. After clicking Search, Ultipa Manager will run the corresponding UQL immediately.
Custom UQL Plugin
Upload Files
Click Add, upload files of UQL plugin, including:
- script.js
- config.json or config.yml
- logo.png (Optional but recommended, recommended size is 180px*180px)
Example
Example: Create a quick plugin for finding a node by UUID
File script.js:
/**
* PluginDo
* @param {*} formData (Data from the form)
* @param {*} client (Use client.uql(uqlString) to get results of UQL)
*/
async function PluginDo(formData = {}, client) {
const { node_uuid } = formData;
const response = await client.uql(
`find().nodes(${node_uuid}) as nodes return nodes{*}`
);
return response;
}
File config.json:
{
"title": "Find Node by UUID",
"form": [
{ "label": "UUID of Node", "name": "node_uuid", "type": "nodeInput" }
]
}
Download full package of the example UQL plugin: Download
After uploading the files, click the plugin, fill in the parameters, then click Search to run the corresponding UQL.
Field Types of the Parameter Form
The supported field types in the form are:
- Node: nodeInput
- Number: numberInput
- String: string
- Switch: bool
- Radio box: radioBox
- Checkbox: checkBox
- Dropdown (single selection): selectSingle
The example configurations in the config.json file is as below:
{
"title": "Demo",
"form": [
{ "label": "Node", "name": "example_1", "type": "nodeInput" },
{ "label": "Number", "name": "example_2", "type": "numberInput" },
{ "label": "String", "name": "example_3", "type": "string" },
{ "label": "Switch", "name": "example_4", "type": "bool" },
{ "label": "Radio Box", "name": "example_5", "type": "radioBox", "defaultValue": "radio1", "values": [
{ "label":"radio1", "value":"radio1" },
{ "label":"radio2", "value":"radio2" }]},
{ "label": "Checkbox", "name": "example_6", "type": "checkBox", "defaultValue": "check1", "values": [
{ "label":"check1", "value":"check1" },
{ "label":"check2", "value":"check2" }]},
{ "label": "Single Select", "name": "example_7", "type": "selectSingle", "defaultValue": "select1", "values": [
{ "label":"select1", "value":"select1" },
{ "label":"select2", "value":"select2" }]}
]
}
Manage UQL Plugins
Both the preset and custom UQL plugin contains the following operations:
- Edit: Edit file script.js of the plugin directly in Ultipa Manager
- Download: Download plugin files (.zip)
- Delete: Remove plugin, deleted ones cannot be recovered in Ultipa Manager.