Subject Re: AW: [Firebird-Java] BLOBs
Author Roman Rokytskyy
>>> @Roman: Is there a way to tell if a field is NULL without reading it?
>>
>> Depends on what level you want this info.
>>
>> - In SQL you can add IS NULL clause to the WHERE conditions.
>>
>> - On the API level you can check the sqlind field of the XSQLDA/XSQLVAR
>> structure
>>
>> - On JDBC API level you use ResultSet.wasNull(...) call.
>
> Unfortunately, you can only call wasNull() after requesting the field itself.

It does not really matter, since the record is already fetched to the
client. So, if you use "native" data type (getInt for INTEGERS, getBlob
for BLOBs etc), you have very little overhead. In case of BLOBs the
overhead is creating one object (no BLOB data are fetched in
non-autocommit mode) which gets garbage collected. For less overhead you
have to use Firebird API directly.

If we talk about not sending data over the wire to the client, the only
possibility is to exclude them via NOT NULL clause in SELECT.

Roman