Apama 10.3 | Apama Documentation | Release Notes | What's New In Apama 9.12 | New optional type in 9.12
New optional type in 9.12
EPL now supports optional types. An optional is a value that may be a value of some other specified EPL type, or empty and thus have no value. This is useful for mapping to null values in other languages such as Java, or for results or fields which may be missing a value.
optional values can be extracted using the new ifpresent statement. This statement is used to check if one or more values are empty. It unpacks the values into new local variables and conditionally executes a block of code. See Defining conditional logic with the ifpresent statement and The ifpresent statement for more information.
Note: The ifpresent keyword can no longer be used as a valid identifier.
The connectivity plug-ins can now handle values of optional type. This means that an empty data_t or a null value in Java will translate to/from an empty optional. See also Map contents used by the apama.eventMap host plug-in.
The Apama event parser libraries for Java and .NET have been improved to support events with optional fields. A new class OptionalFieldType (accessible via FieldTypes.Optional) has been added to represent the optional field type. For complete information about this class, refer to the description of
*com.apama.event.parser in the API Reference for Java (Javadoc)
*Apama.Event.Parser Namespace in the API Reference for .NET
Note: optional event field support will not be available in the C parser in AP_EventParser and AP_EventWriter.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.