Specifying transform groups for external routines
The CREATE FUNCTION and CREATE METHOD statements enable you to specify the TRANSFORM GROUP clause, which is only valid when the value of the LANGUAGE clause is not SQL. SQL language functions do not require transforms, while external functions do require transforms.
About this task
The TRANSFORM GROUP clause allows you to specify, for
any given function or method, the transform group that contains the
TO SQL and FROM SQL transforms used for structured type parameters
and results. In the following example, the CREATE FUNCTION and CREATE
METHOD statements specify the transform group func_group
for
the TO SQL and FROM SQL transforms:
CREATE FUNCTION stream_from_client (VARCHAR (150))
RETURNS Address_t
...
TRANSFORM GROUP func_group
EXTERNAL NAME 'addressudf!address_stream_from_client'
...
CREATE METHOD distance ( point )
FOR polygon
RETURNS integer
:
TRANSFORM GROUP func_group ;