body - request data for OSI POST
The body passed to an OSI request is a kind of expression that supports filtering, update operations and field mapping. The body for an OSI PUT request has the following syntax:
body := source [ fieldlist ]
source := operand | expr_code
fieldlist := fassign '{' fielddef [fielddef_ext(*)] '}'
fassign := '==>'
fielddef_ext := ',' fielddef
fielddef := name [assignment]
assignment := ':' body
name - is the name of a named_value in the JSON result string (see topic Values, formats and encoding below)
operand - is a syntax element defined in OSI BNF . Semantic details are described in ODABA Script Interface - OSI . An operand is either an access path consisting of property and function names separated by '.' or an expression (arithmetical, Boolean etc).
expr_code - is an inline OSI function containing any number of statements, variable declarations etc.
// operand examples
Persons // extent name
Persons() // collection property
birth_day // property name
Persons(0).children(0).name // property path
Persons.count() // access path (consists of properties and operations)
Date.now - birth_day // expression
// expr_code example (with Person as calling object)
{
VARIABLES
int(10,2) income;
PROCESS
children.top();
while ( children.next() )
income += children.income;
FINAL
return(income);
}