Node
Create, read and change JSON nodes kept in the MentDB storage: insert, select, update and delete elements of their objects and arrays. Typical use: store small configuration or state documents. Changes are direct, so beware of data corruption.
node create node create|insert|addnode existnode deletenode iobjectnode shownode countnode fieldsnode iarraynode iarraynode is arraynode is objectnode selectnode uarraynode uobjectnode darraynode dobject

node create <key>


Synonymous

    node create|insert|add

Description

    To create a new empty node

Parameters

    key:   The key - string - required
admin
node create "keyId";
mentdb
Node keyId created with successful.
Used in use cases (18 recipes)

    MQL developer › Cache a slow result in a node with a TTL
    Backend & web service developer › Signed webhook receiver with replay protection
    JSON & document store developer › Feature flags stored in a node
    Execution modes › Stack run postponed until a gate opens
    Web service developer › POST: create an order with validation
    Scheduler developer › Prove a job ran with the log table
    and 12 more in the Use cases
Often used with

    node delete  ·  node iobject  ·  node select  ·  script create  ·  script delete  ·  execute  ·  string regexp_replace  ·  is null

node exist <key>


Description

    To check if a node already exists

Parameters

    key:   The key - string - required
admin
node exist "keyId"
mentdb
1
Used in use cases (6 recipes)

    MQL developer › Cache a slow result in a node with a TTL
    Backend & web service developer › Signed webhook receiver with replay protection
    JSON & document store developer › Feature flags stored in a node
    Execution modes › Stack run postponed until a gate opens
    Event developer › Process a CSV on arrival and archive it
    JSON & document store developer › A report cached in a node with a time to live
Often used with

    node create  ·  node delete  ·  node iobject  ·  node select  ·  not  ·  script create  ·  script delete  ·  and

node delete <key>


Description

    To remove a node

Parameters

    key:   The key - string - required
admin
node delete "keyId";
mentdb
1
Used in use cases (18 recipes)

    MQL developer › Cache a slow result in a node with a TTL
    Backend & web service developer › Signed webhook receiver with replay protection
    JSON & document store developer › Feature flags stored in a node
    Execution modes › Stack run postponed until a gate opens
    Web service developer › POST: create an order with validation
    Scheduler developer › Prove a job ran with the log table
    and 12 more in the Use cases
Often used with

    node create  ·  node iobject  ·  node select  ·  script create  ·  script delete  ·  execute  ·  string regexp_replace  ·  is null

node iobject <key> <jPath> <fieldname> <value> <type>


Description

    To insert an element into an object in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
    fieldname:   The field name - string - required
    value:   The value - string - required
    type:   The type (NUM|INT|STR|BOOL|BOOL2|ARRAY|OBJ) - string - required
admin
node iobject "keyId" / a 5 NUM
mentdb
Inserted with successful.
admin
node iobject "keyId" / tab "[]" ARRAY
mentdb
Inserted with successful.
Used in use cases (18 recipes)

    MQL developer › Cache a slow result in a node with a TTL
    Backend & web service developer › Signed webhook receiver with replay protection
    JSON & document store developer › Feature flags stored in a node
    Execution modes › Stack run postponed until a gate opens
    Web service developer › POST: create an order with validation
    Scheduler developer › Prove a job ran with the log table
    and 12 more in the Use cases
Often used with

    node create  ·  node delete  ·  node select  ·  script create  ·  script delete  ·  execute  ·  string regexp_replace  ·  is null

node show <table> <key>


Description

    To show a specific node

Parameters

    table:   The table - string - not required
    key:   The key - string - required
admin
node show "keyId"
mentdb
{ "a": 5.0, "tab": [], "key": "keyId" }
Used in use cases (2 recipes)

    JSON & document store developer › Feature flags stored in a node
    Event developer › Process a CSV on arrival and archive it
Often used with

    node create  ·  node delete  ·  node exist  ·  node iobject  ·  and  ·  atom get  ·  atom size  ·  file copy_file

node count <key> <jPath>


Description

    To count the elements in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
admin
node count "keyId" /
mentdb
3
Used in use cases (5 recipes)

    JSON & document store developer › Feature flags stored in a node
    Scheduler developer › A sampling job and statistics on its rolling window
    Event developer › Refuse a file received twice under two names
    Algorithms in MQL › Fibonacci with a memo stored in a node
    JSON & document store developer › A report cached in a node with a time to live
Often used with

    node create  ·  node delete  ·  node iobject  ·  node select  ·  script create  ·  script delete  ·  node darray  ·  node iarray

node fields <key> <jPath>


Description

    To get all the fields of an object in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
admin
node fields "keyId" /
mentdb
[ "a", "tab", "key" ]
Used in use cases (5 recipes)

    MQL developer › Cache a slow result in a node with a TTL
    JSON & document store developer › Feature flags stored in a node
    Web service developer › GET: one order, 404, or the list
    Web service developer › DELETE: idempotent delete with an audit trail
    Web service developer › Search with sort and pagination
Often used with

    node create  ·  node delete  ·  node iobject  ·  node select  ·  execute  ·  script create  ·  script delete  ·  string regexp_replace

node iarray <key> <jPath> <value> <type>


Description

    To insert an element into an array in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
    value:   The value - string - required
    type:   The type (NUM|INT|STR|BOOL|BOOL2|ARRAY|OBJ) - string - required
admin
node iarray "keyId" /tab test STR;
mentdb
Inserted with successful.
admin
node iarray "keyId" /tab test2 STR
mentdb
Inserted with successful.
admin
node show "keyId"
mentdb
{ "a": 5.0, "tab": [ "test", "test2" ], "key": "keyId" }

node iarray <key> <jPath> <index> <value> <type>


Description

    To insert an element into an array in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
    index:   The index position - string - required
    value:   The value - string - required
    type:   The type (NUM|INT|STR|BOOL|BOOL2|ARRAY|OBJ) - string - required
admin
node iarray "keyId" /tab 0 test STR;
mentdb
Inserted with successful.
admin
node iarray "keyId" /tab test2 STR
mentdb
Inserted with successful.
admin
node show "keyId"
mentdb
{ "a": 5.0, "tab": [ "test", "test", "test2", "test2" ], "key": "keyId" }
Used in use cases (4 recipes)

    JSON & document store developer › Feature flags stored in a node
    Web service developer › PUT: update a status along a workflow
    Scheduler developer › A sampling job and statistics on its rolling window
    JSON & document store developer › A report cached in a node with a time to live
Often used with

    node create  ·  node delete  ·  node iobject  ·  node select  ·  node count  ·  node darray  ·  node uobject  ·  not

node is array <key> <jPath>


Description

    To check if an element is an array in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
admin
node is array "keyId" /tab
mentdb
1
Used in use cases (1 recipe)

    JSON & document store developer › Feature flags stored in a node
Often used with

    node count  ·  node create  ·  node darray  ·  node delete  ·  node dobject  ·  node exist  ·  node fields  ·  node iarray

node is object <key> <jPath>


Description

    To check if an element is an object in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
admin
node is object "keyId" /
mentdb
1
Used in use cases (1 recipe)

    JSON & document store developer › Feature flags stored in a node
Often used with

    node count  ·  node create  ·  node darray  ·  node delete  ·  node dobject  ·  node exist  ·  node fields  ·  node iarray

node select <key> <jPath>


Description

    To select an element in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
admin
node select "keyId" /a
mentdb
5.0
Used in use cases (16 recipes)

    MQL developer › Cache a slow result in a node with a TTL
    Backend & web service developer › An authentication guard shared with include
    JSON & document store developer › Feature flags stored in a node
    Execution modes › Stack run postponed until a gate opens
    Web service developer › POST: create an order with validation
    Scheduler developer › Prove a job ran with the log table
    and 10 more in the Use cases
Often used with

    node create  ·  node delete  ·  node iobject  ·  script create  ·  script delete  ·  execute  ·  string regexp_replace  ·  is null

node uarray <key> <jPath> <index> <value> <type>


Description

    To update an element in an array in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
    index:   The index - integer - required
    value:   The value - string - required
    type:   The type (NUM|INT|STR|BOOL|BOOL2|ARRAY|OBJ) - string - required
admin
node uarray "keyId" /tab 1 test2 STR;
mentdb
Updated with successful.
admin
node show "keyId"
mentdb
{ "a": 5.0, "tab": [ "test", "test2", "test2", "test2" ], "key": "keyId" }
Used in use cases (1 recipe)

    JSON & document store developer › Feature flags stored in a node
Often used with

    node count  ·  node create  ·  node darray  ·  node delete  ·  node dobject  ·  node exist  ·  node fields  ·  node iarray

node uobject <key> <jPath> <fieldname> <value> <type>


Description

    To update an element in an object in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
    fieldname:   The field name - string - required
    value:   The value - string - required
    type:   The type (NUM|INT|STR|BOOL|BOOL2|ARRAY|OBJ) - string - required
admin
node uobject "keyId" / a 8 NUM;
mentdb
Updated with successful.
admin
node show "keyId"
mentdb
{ "a": 8.0, "tab": [ "test", "test2", "test2", "test2" ], "key": "keyId" }
Used in use cases (6 recipes)

    Backend & web service developer › An authentication guard shared with include
    JSON & document store developer › Feature flags stored in a node
    Execution modes › Lost updates and synchronized
    Web service developer › PUT: update a status along a workflow
    JSON & document store developer › A report cached in a node with a time to live
    Web service developer › PUT with optional fields and optimistic locking
Often used with

    node create  ·  node delete  ·  node iobject  ·  node select  ·  execute  ·  script create  ·  script delete  ·  not

node darray <key> <jPath> <index>


Description

    To delete an element from an array in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
    index:   The index - integer - required
admin
node darray "keyId" /tab 0;
mentdb
Deleted with successful.
admin
node show "keyId"
mentdb
{ "a": 8.0, "tab": [ "test2", "test2", "test2" ], "key": "keyId" }
Used in use cases (3 recipes)

    JSON & document store developer › Feature flags stored in a node
    Scheduler developer › A sampling job and statistics on its rolling window
    JSON & document store developer › A report cached in a node with a time to live
Often used with

    node count  ·  node create  ·  node delete  ·  node iarray  ·  node iobject  ·  node select  ·  node exist  ·  node uobject

node dobject <key> <jPath> <fieldname>


Description

    To delete an element from an object in a node

Parameters

    key:   The key - string - required
    jPath:   The JSON path - string - required
    fieldname:   The field name - string - required
admin
node dobject "keyId" / a;
mentdb
Deleted with successful.
admin
node show "keyId"
mentdb
{ "tab": [ "test2", "test2", "test2" ], "key": "keyId" }
Used in use cases (2 recipes)

    JSON & document store developer › Feature flags stored in a node
    Web service developer › DELETE: idempotent delete with an audit trail
Often used with

    node create  ·  node delete  ·  node fields  ·  node iobject  ·  node select  ·  case  ·  date sysdate  ·  execute