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 possible with Gadfly?
TIA,
Micheál
Erm. No. Gadfly is a very light-weight database. It accepts SQL commands, but it 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/