Since the size of data in BLOBs is, by design, unspecified, it is practicable only to support them in imports. The input file is expected to include a field corresponding to the BLOB column in the DSQL statement, containing either the data that is to be written or an absolute or relative path to a file containing the data for that record.
The attributes for the field are listed in a curly-bracketed embedded descriptor, along with any other attributes that are valid. For example:
INSERT INTO ATABLE (
...,
MY_BLOB_COLUMN {position=4, ascii_blob},
...
)
values (..., ?, ...)
You may specify only one set of attributes for the BLOB input, so never try to load two or more BLOBs of different types for the same column.
Blob-related Attributes
Qualifier Keyword
|
Argument
|
Equiv.
Switch
|
Description
|
Input/Output
|
ascii_blob %S
|
No argument
%S is not a structural element in the syntax. It represents the data that is in the input field at the given position.
|
|
The parser will try to use %S as the absolute or relative path to a file and, if it finds the file, reads its data into the variable it has assigned for the BLOB column. If it fails to find the file, it uses the bytes of %S as the data for the BLOB.
Don't be alarmed by use of the "ascii" moniker in this qualifier. It was used by the original author of the software as a synonym for "text". You should ensure that your text file or inline data uses a character set that is compatible with that of the destination text BLOB.
|
Input
|
blob_size=N
|
N is the segment size
|
-b N
|
Unless instructed otherwise, dbFile takes segmented binary as the default BLOB style and reads in the data as binary segments of N bytes. The default segment size is 80 bytes.
Don't worry if the segment size set here is not the same as that of the target column. Even though dbFile may attempt to slice up the text into N-sized segments, the size of BLOB segments arriving at the Firebird server is irrelevant to how data is segmented for storage: Firebird always uses its own algorithms.
|
Input
|
NB :: associated command line switch that has no equivalent options attribute
|
-a
|
Include this switch in the command line to instruct dbFile to read line-break characters as segment boundaries, according to the argument set by the global option lineend=C or switch -l C (where C is one of M, P or U for the platform-specific line-break convention used on traditional Macintosh, Windows or POSIX, respectively).
|
Input
|
blob_stream
|
No argument
|
-r
|
Use blob streaming and ignore segments. The blob_size and blob_stream attributes are incompatible. However, if you accidentally supply both then dbFile will work with the directive it encounters last.
|
Input
|
|