Subject | Re: [Firebird-Architect] API Firebird so hard to do with |
---|---|
Author | Alex Peshkov |
Post date | 2008-01-31T08:09:35Z |
On Thursday 31 January 2008 10:11, said bounderra wrote:
patrameters. This approach has one disadvantage - when you need to add more
members to such Init structure (i.e. more parameters to DPB), you need to
take care about backward compatibility. Here arrive sizeof(struct Init) as
it's first element (supposing new elements are added in the end of a
structure) or it's version, also stored in the begining of that structure.
All that doable, but on contrary with DPB forces you to have one more
action - initialize that first value. With existing DPB approach new
parameters are simply added - and that's all, people may use it.
making life easier - liek IBPP, for example.
> I'll give a simple exemple :You prefer structure with many-many fields to the long-long list of DPB
> Connecting to the database ...
> why should I full a DBP before connecting ....???
> I think i'll be better if instead of fulling the dbp creating some other
> structure and full it
patrameters. This approach has one disadvantage - when you need to add more
members to such Init structure (i.e. more parameters to DPB), you need to
take care about backward compatibility. Here arrive sizeof(struct Init) as
it's first element (supposing new elements are added in the end of a
structure) or it's version, also stored in the begining of that structure.
All that doable, but on contrary with DPB forces you to have one more
action - initialize that first value. With existing DPB approach new
parameters are simply added - and that's all, people may use it.
> then pass it to a function like api used in mysql forFrom what language are you calling C API? There are many different wrappers,
> exemple ...
> MySQL *p
> mysql_init(p);
> .......
> mysql_real_connect(.....some....simple...params....)
> I think that not all programmers professionl like ..... there for it is
> necessery to redesign this API in order to be accessible for all thank you
making life easier - liek IBPP, for example.