FirebirdSQL logo

A BLOB FILTER is a database object that is a special type of external function, with the sole purpose of taking a BLOB object in one format and converting it to a BLOB object in another format.The formats of the BLOB objects are specified with user-defined BLOB subtypes.

External functions for converting BLOB types are stored in dynamic libraries and loaded when necessary.

For more details on BLOB subtypes, see Binary Data Types.

DECLARE FILTER

Declares a BLOB filter in the current database

Available in

DSQL, ESQL

Syntax
DECLARE FILTER filtername
  INPUT_TYPE <sub_type> OUTPUT_TYPE <sub_type>
  ENTRY_POINT 'function_name' MODULE_NAME 'library_name'

<sub_type> ::= number | <mnemonic>

<mnemonic> ::=
    BINARY | TEXT | BLR | ACL | RANGES
  | SUMMARY | FORMAT | TRANSACTION_DESCRIPTION
  | EXTERNAL_FILE_DESCRIPTION | user_defined
Table 1. DECLARE FILTER Statement Parameters
Parameter Description

filtername

Filter name in the database.The maximum length is 63 characters.It need not be the same name as the name exported from the filter library via ENTRY_POINT.

sub_type

BLOB subtype

number

BLOB subtype number (must be negative)

mnemonic

BLOB subtype mnemonic name

function_name

The exported name (entry point) of the function

library_name

The name of the module where the filter is located

user_defined

User-defined BLOB subtype mnemonic name

The DECLARE FILTER statement makes a BLOB filter available to the database.The name of the BLOB filter must be unique among the names of BLOB filters.