[Zope] Trigger/Auto ID on Gadfly DB
Micheál Healy
michael.healy@engitech.ie
Tue, 5 Nov 2002 16:23:30 -0000
Thanks - I guess I'll just do a select and increment the thing myself.
Sorry about the double post. for some reason, it took ages for the original
one to appear on the list.
Micheál
----- Original Message -----
From: "Matthew T. Kromer" <matt@zope.com>
To: "Micheál Healy" <michael.healy@engitech.ie>
Cc: <zope@zope.org>
Sent: Tuesday, November 05, 2002 4:02 PM
Subject: Re: [Zope] Trigger/Auto ID on Gadfly DB
> Micheál Healy wrote:
>
> > Hi all,
> >
> > Is it possible to set a trigger on a gadfly database table? I would
> > like to automatically generate an Id on a table each time I insert.
> > In Oracle, I would create a sequence and then create a trigger on the
> > table in question based on the sequence. I something similar possibl=
e
> > with Gadfly?
> >
> > TIA,
> >
> > Micheál
>
>
> Erm.
>
> No.
>
> Gadfly is a very light-weight database. It accepts SQL commands, but i=
t
> isn't a "full" database like you might think.
>
> I dont know if it has automatic sequence numbers -- that's your real
> question. Each RDBMS tends to do automatic sequence number differently.
> Oracle actually does it the most awkward way, by requiring you to set =
a
> trigger on inserts. Most other RDBMS will let you specific an
> auto-increment column some way.
>
> Granted, I could be wrong about Gadfly -- I only spent about 90 seconds
> grepping the source for a likely auto-increment column operator. But I
> do not believe Gadfly does this for you.
>
> --
> Matt Kromer
> Zope Corporation http://www.zope.com/
>