VBlob values

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sun Jun 13 09:28:58 CDT 2010


On 6/13/10 11:38 AM, "Erne" <ernestogiannotta at tiscalinet.it> wrote:

Hi Erne,

> VBlob has methods:
> -(NSData*) readRawData;
> -(void) writeRawData:(NSData*) inNewValue;
> 
> that work pretty fine.
> 
> However calling super methods:
> - (id)value;
> - (void)setValue:(id)inValue;

I.e. Method of Vfield, which works with ID as a variant ...

May be this is fixed already. Not sure.
Pelase report to mantis as separate issue.
 
> I don't get the same expected results
> (VBlob:value will return 0 for null blobs and 1 for not null ones)
> 
> why VBlob:value behaves different from other fields?

Because BLOB is very different from other types...

It is big. It can be HUGE.
Its in 2.0 we have made lazy way -- we have start believe that BLOB value
will fit RAM of computer. This looks to be true. But many DBs and V1 have
consider BLOB value as STREAM, which can be very big ...


> I guess this being a detail implementation but shouldn't it be transparently
> handled for us?

It is possible.
 
> I'd like to have VBlob methods consistent with other VFields like:
> -(NSData*)dataValue;
> -(void)setDataValue:(NSData*) inNewValue;
> 
> (no big deal, just a naming convention change)

I can agree with this also.

ReadRawData/ WriteRawData methods we need to be consitent with our general
ADK API, 

And we can add this 2 methods also ...

So developer can use both ways.


> and super:value return the expected object...
> 
> Well, I understand this will likely break the OOP logic purity
> forcing some "if" check on your side to handle this special case
 
> But as things stand now this sanity check is just deferred on our side
> that in theory should know nothing about internal implementation details
> (like the fact that I imagine you mark with 0 a null blob and 1 a not null
> one)
> 
> 
> What do you think?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list