Subject RE: [ib-support] Idea for a new field type for FB 2,0 or IB 7?
Author Paulo Gaspar
I find such feature very handy and flexible.

Being able to specify the generator is quite useful when one wants
fields in different table to follow the same generator, has it
happens with some version control schemes.

And following the typical 'BEFORE INSERT' generator use rules makes
it simpler to implement, raising less transaction related problems.

The AUTOGEN name is much more consistent with what this "modus
operandi" and leaves room for some daring (i.e.: completely mad)
guy to implement a "real" incremental type one day and use the
"AUTOINC" name then.


Have fun,
Paulo Gaspar

http://www.krankikom.de
http://www.ruhronline.de


> -----Original Message-----
> From: Artur Anjos [mailto:arsoft@...]
> Sent: Wednesday, November 21, 2001 4:36 PM
> To: ib-support@yahoogroups.com
> Subject: Re: [ib-support] Idea for a new field type for FB 2,0 or IB 7?
>
>
>
> "Helen Borrie" wrote:
> > And..Ugh, just think what problems there would be in our comfortable
> little world if that AUTOINC type were under transaction control...
>
> I think the idea is good, since it will use a generator. And it
> will follow
> the rules of the generator.
>
> Under transaction control the generator will increment outside the
> transaction, so the only problem is that we will not have the warranty to
> have sequential numbers always incremented by one (if the transaction is
> roll back it will happen).
>
> I think the ideia is to replace the tedious triggers 'BEFORE INSERT' that
> checks
> IF( new.Something is NULL) then new.Something=Generator(Gen_Something,1)
>
> (That's why Jason ask's for 'Not Null', to let IBO create it for
> KeyLinks).
>
> Can I suggest to replace the name AUTOINC to AUTOGEN?
>
> I think that will not create confusion about "lost numbers" and will give
> the user the possibility to add a identification name to the Generator. I
> think something like:
>
> CREATE TABLE (
> MyId AUTOGen(GeneratorName),
> bla bla bla
> );
>
> Sorry for my english,
>
> Artur Anjos
> Portugal
>
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>