User Defined Functions (UDF)
Apollo Server allows you to create custom user-defined functions that extend the built-in Apollo functions provided by Apollo. Developers can use Delphi to create these powerful UDFs which are Win32 .DLL files that contain exported functions. UDFs are recognized by Apollo as native functions. UDFs can be used to define powerful Triggers and V-Script indexes.
For example, if you want to dynamically split a column called "FullName" into "FirstName" and "LastName" indexe keys, you could create 2 UDFs: ExtractFirstName( [fullname]) and ExtractLastName( [fullname] ) that will return the extracted text. ExtractFirstName would contain logic that returned the first part of the "FullName" column and ExtractLastName would have logic that returned the second part of the FullName data. The returned value would then be processed by the Apollo database engine as if it came from a native function.
Steps to create a UDF
Apollo7.UDF is a text file that contains a list of all UDF functions with corresponding DLL names and functions. This Apollo7.UDF file must exist in the same directory as the SDE*.DLL engine. Apollo allows you to define an unlimited number UDFs. Each UDF supports up to 8 parameters. UDF parameters and the return value can be one of the following types:
The UDF file variablss are as follows:
Using Specific Components
Knowledge Base Articles
|© Copyright 1999-2018 ApolloDB. All rights reserved.