FUNCTION Keyword

Purpose

Invokes the specified Ingres/ICE extension function or server function.

Syntax

For Server Functions

<!-- #ICE [REPEAT]
        FUNCTION=
`server_function_name?action=action&property]        [=value][{&property=value}]`
-->

Description

Parameters                          The following table lists the parameters used with the FUNCTION keyword:

 

Parameter

Description

function_name

The name of the function.

variable_name

The name of a variable being passed to the function.

value

The value assigned to the variable.  For server functions, value is only specified if the requested action/property combination is associated with an output value.

action

For Ingres/ICE server functions, specifies the query operation to be executed.  Possible values include select, retrieve, insert, update, and delete, depending on the function.  (See the “Ingres/ICE Server Functions” appendix for valid action parameters.)

property

The Ingres/ICE server parameter to which the action applies.  (See the “Ingres/ICE Server Functions” appendix for valid property values.)

HTML text with variables

Any allowable HTML text.  A format string containing markup tags and column names.  This option provides the ability to describe a line of HTML or markup language syntax and embed within it variable placeholders.

Refer to the Writing Ingres/ICE Server Extensions section in the “Creating Web Applications” chapter for more information on writing extension functions.

Also, refer to the “Ingres/ICE Server Functions” appendix for a description of the possible functions and variables that can be used with the FUNCTION keyword to access the Ingres/ICE server.  Server functions can be invoked through the Ingres/ICE C API (for more information, see the “Ingres/ICE C API” chapter).

 

REPEAT Option                   The REPEAT option allows the recursive parsing of macros.  This allows multiple queries and macros to be embedded within a single macro.  It must be used in conjunction with another macro option and has no meaning when used on its own.

Since the grave quote (`) and the colon (:) characters are used as delimiters, they must be duplicated when used with the REPEAT option.  This option has the effect of disabling the delimiting effect when only one delimiter is used.

Example

The following example invokes the “unit” Ingres/ICE server function, which changes the plays unit name to “Shakespeare”:

<!-- #ICE FUNCTION=`unit?action=

   update&unit_id=3&unit_name=Shakespeare`

-->