21.06.2012 16:31, Adriano dos Santos Fernandes wrote:
>
> It's sad that isc_segment and isc_segstr_eof are considered errors and
> goes to status vector and not only returned by isc_get_segment,
> different than isc_dsql_fetch and its 100 status.

I agree this is very confusing.

> I don't consider isc_segment/isc_segstr_eof as really errors, and surely
> they should not be thrown when working with C++.
>
> So I think getSegment must be adapted to return ISC_STATUS code and have
> the returnLength parameter.

If we're about to change this, I'd rather prefer to not treat them as 
status values at all. Let's make Blob::getSegment() returning int and 
declare these two values as special ones, similarly to fetch(). And they 
don't have to be equal to the status values numerically, we could 
replace them in the upper layers (old API).

BTW, Statement::fetch() doesn't have to return 100 either. It could 
return boolean true/false and be replaced with 100 in the old API only.

> Also, one of these two things must be made:
> 1) Make IStatus::isSuccess (default impl.) to not consider
> isc_segment/isc_segstr_eof as errors.
> 2) Make getSegment not put isc_segment/isc_segstr_eof on the status, but
> only return it. Of course, isc_get_segment must continue work as now.
>
> (2) seems a much better option IMO.

Agreed re. (2) as a better option.


Dmitry

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to