| Firebird Documentation Index → Firebird 2.0 Language Ref. Update → DDL statements → DECLARE FILTER |
![]() |
Available in: DSQL, ESQL
Changed in: 2.0
Description: Makes a BLOB filter known to the database.
Syntax:
DECLARE FILTERfilternameINPUT_TYPE<blobtype>OUTPUT_TYPE<blobtype>ENTRY_POINT 'function_name' MODULE_NAME 'library_name'<blobtype>::=number|<mnemonic><mnemonic>::= binary | text | blr | acl | ranges | summary | format | transaction_description | external_file_descriptionThe possibility to indicate the BLOB types with mnemonics instead of numbers was added in Firebird 2. The predefined mnemonics are case-insensitive.
Example:
declare filter Funnel input_type blr output_type text entry_point 'blr2asc' module_name 'myfilterlib'
If you want to define mnemonics for your own BLOB subtypes, you can add them to the RDB$TYPES system table as shown below. Once committed, the mnemonics can be used in subsequent filter declarations.
insert into rdb$types (rdb$field_name, rdb$type, rdb$type_name)
values ('RDB$FIELD_SUB_TYPE', -33, 'MIDI')
The value for rdb$field_name must always be
'RDB$FIELD_SUB_TYPE'. If you define your mnemonics in all-uppercase,
you can use them case-insensitively and unquoted in your filter declarations.
| Firebird Documentation Index → Firebird 2.0 Language Ref. Update → DDL statements → DECLARE FILTER |