modify
Description
Modify simple objects and attributes or even complete graphs
Parameters
data Any valid JSON structure (using SFSQL-conforming names)
Example: Simple
In this example, we set the value of text attribute "testRootPrimitive" under root to "test string"
[ { "modify": { "data": { "testRootPrimitive": "test string" } } } ]
Example: Nested Structures
[ { "modify": { "data": { "company": { "cname": "Company Inc.", "phone": [ "111-111-1111", "222-222-2222" ], "address": { "name": "Company Inc Headquarters", "street": "123 Headquarter St.", "city": "Rochester", "state": "NY", "pcode": "14605" } } }, "_comment": "Example: Nested Structures" } } ]





#include
Include an external JSON source file or files

Example: add the person objects represented by the json files found in directory /var/persons/, stopping after processing 100 files.
... "o:person": [ {"#append": {} }, { "#include": { "files": [ { "dir": "/var/persons/", "fpat": "*.json" } ], "batch": { "id": "personsAppend", "size": 100 } } } ]

Parameters:
files The parameter section that defines the files to be included.
dir
The root directory where files will be included from.
fpat
The file pattern used to match files found in specified dir.

If directories are nested, a multi-layered pattern can be used to arrive at the final destination files.
For example: a pattern of "*/*.json" would include dir/XYZ/person1.json but not dir/xyz/abc/person2.json
batch The parameter section that defines the batch parameters
id
Provide a batch id unique to this include process.

For example, if we specify an id of 'personBatch' and only run the first 100 files (via the 'size' parm), then specifying the same 'personBatch" value for id will allow us to continue including files where we last left off, at file 101.
size
The batch size to use.
startpos
The start position to use within the batch.

This value is automatically kept track of per each batch 'id' (starting at position 0 the first time used and incremented to the position of the last included file +1 at batch completion). However, you can explicitly provide a value in order to for instance, restart your batch at 0.

#insert
Insert new attributes into a specified position of an array.

TO BE IMPLEMENTED