SPLASH directly creates record events, which are records with an associated operation like "insert". This documentation uses the term "record" interchangeably with "record event".
[ integer key1; string key2; | string dataField; ]For instance, the above type describes records with key fields key1 and key2, of types integer and string respectively, and the non-key field dataField of type string. The key fields appear before the "|" symbol.
[ key1 = 9; key2 = 'USD'; | string data = 'US Currency'; ]The syntax of record values is fairly flexible. You can write the same record as
[ key1 = 9; key2 = 'USD' | string data = 'US Currency' ] [ key1 = 9; key2 = 'USD' | string data = 'US Currency'; ]eliminating any semi-colon but those between field = value.
setOpcode([ key1 = 9 | string data = 'US Currency' ], update)
[ integer key1; | string dataField; float otherData]you can set
var := [key1 = 1; dataField = 'newdata'];The record value is implicitly cast to the right type, making key1 the key field and setting the otherData field to null.
Operations on records:
Type: The value returned has the type of the field.
Example: rec.data1
Syntax: record.field := value
Type: The value must be a value matching the type of the field of the record. The expression returns a record.
Example: rec.data1 := 10
1 means "insert"
3 means "update"
5 means "delete"
7 means "upsert"(insert if not present, update otherwise)
13 means "safe delete"(delete if present, ignore otherwise)
Syntax: getOpcode(record)
Type: The argument must be an event. The function returns an integer.
Example: getOpcode(input)
Syntax: setOpcode(record,opCodenumber)
Type: The first argument must be a record, and the second an integer. The function returns the modified record.
Example: setOpcode(input,insert)