Subject Re: [ib-support] Idea for a new field type for FB 2,0 or IB 7?
Author Artur Anjos
"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