import com.teradata.fnc.*; import java.io.*; import java.sql.*; public class class_name { ... public static result_type method_name ( Phase phase, Context[] context, type_1 input_param_1, ..., type_n input_param_n) { ... } }
where:
Return Type/Parameter … | Specifies … |
---|---|
result_type | a Java primitive or class corresponding to the SQL data type in the RETURNS clause of the corresponding CREATE FUNCTION statement. |
com.teradata.fnc.Phase phase | a required parameter that lets Teradata Database pass in the current aggregation phase. The aggregation phase determines how the method processes the data passed in. For details on the Phase class, see com.teradata.fnc.Phase. |
com.teradata.fnc.Context[] context | a required parameter that provides a way for the method to access intermediate storage to combine data passed in during the various aggregation phases. For details on the Context class, see com.teradata.fnc.Context. |
type_n input_param_n | the input parameters, where n is the number of parameters in the CREATE FUNCTION definition. If n = 0, no input parameters appear. The type is a Java primitive or class corresponding to the SQL data type of the input argument. The maximum number of input parameters is 128. |