[Zope] Trigger/Auto ID on Gadfly DB
Matthew T. Kromer
matt@zope.com
Tue, 05 Nov 2002 11:02:13 -0500
Miche=E1l Healy wrote:
> Hi all,
> =20
> Is it possible to set a trigger on a gadfly database table? I would=20
> like to automatically generate an Id on a table each time I insert. =20
> In Oracle, I would create a sequence and then create a trigger on the=20
> table in question based on the sequence. I something similar possible=20
> with Gadfly?
> =20
> TIA,
> =20
> Miche=E1l
Erm.
No.
Gadfly is a very light-weight database. It accepts SQL commands, but it=20
isn't a "full" database like you might think.
I dont know if it has automatic sequence numbers -- that's your real=20
question. Each RDBMS tends to do automatic sequence number differently.=20
Oracle actually does it the most awkward way, by requiring you to set a=20
trigger on inserts. Most other RDBMS will let you specific an=20
auto-increment column some way.
Granted, I could be wrong about Gadfly -- I only spent about 90 seconds=20
grepping the source for a likely auto-increment column operator. But I=20
do not believe Gadfly does this for you.
--=20
Matt Kromer
Zope Corporation http://www.zope.com/=20