DECLARE FILTER

From InterBase

Go Up to Statement and Function Reference (Language Reference Guide)


Declares an existing Blob filter to a database. Available in gpre, DSQL, and isql.

DECLARE FILTER filter 
INPUT_TYPE subtype OUTPUT_TYPE subtype
ENTRY_POINT 'entryname' MODULE_NAME 'modulename';
Important:
In SQL statements passed to DSQL, omit the terminating semicolon. In embedded applications written in C and C++, and in isql, the semicolon is a terminating symbol for the statement, so it must be included.
Argument Description

<filter>

Name of the filter; must be unique among filter names in the database.

INPUT_TYPE <subtype>

Specifies the Blob subtype from which data is to be converted.

OUTPUT_TYPE <subtype>

Specifies the Blob subtype into which data is to be converted.

‘<entryname>’

Quoted string specifying the name of the Blob filter as stored in a linked library.

‘<modulename>’

Quoted file specification identifying the object module in which the filter is stored.

Description: DECLARE FILTER provides information about an existing Blob filter to the database: where to find it, its name, and the Blob subtypes it works with. A Blob filter is a user-written program that converts data stored in Blob columns from one subtype to another.

INPUT_TYPE and OUTPUT_TYPE together determine the behavior of the Blob filter. Each filter declared to the database should have a unique combination of INPUT_TYPE and OUTPUT_TYPE integer values. InterBase provides a built-in type of 1, for handling text. User-defined types must be expressed as negative values.

<entryname> is the name of the Blob filter stored in the library. When an application uses a Blob filter, it calls the filter function with this name.

Example: The following isql statement declares a Blob filter:

DECLARE FILTER DESC_FILTER
INPUT_TYPE 1
OUTPUT_TYPE -4
ENTRY_POINT 'desc_filter'
MODULE_NAME 'FILTERLIB';

See Also

Advance To: