global.setObject()
Stores a CFML struct in a MUMPS global.
Arguments
Name | Type | Required | Description |
---|---|---|---|
inputStruct | struct | Yes | The structure to be stored |
Note that if any members of inputStruct are arrays, a later call to getObject() to retrieve the saved struct will return them as normal structures with numeric keys.
Return Value
None.
Exceptions
If the lib.cfmumps.global object was opened with the atomic argument set to true, global.setObject() can raise an exception if the lock on the specified global and subscripts is not acquired within the object's lockTimeout duration.
Example
CFML
<cfset myStruct = {person: {name: "John Willis", DOB: "12/1/1980"}}> <cfset glob = new lib.cfmumps.Global("people", [1])> <cfset glob.setObject(myStruct)> <cfset newStruct = {}> <cfset newStruct = glob.getObject()> <cfoutput> Name: #newStruct.name#<br> DOB: #newStruct.DOB# </cfoutput>