Hi Jason, On Fri, Dec 4, 2009 at 2:43 PM, Jason Baker <[email protected]> wrote: > One thing we'd like to have in storm is the ability to specify a sequence > that we can use by default on primary keys. For instance, suppose I have a > class like this: > class Foo(object): > __storm_table__ = 'foo' > foo_pk = Int(primary=True) > If we want foo_pk to autoincrement on Oracle, our only option is to define a > trigger that will call nextval on the sequence. It would be nice to be able > to do something like this: > class Foo(object): > __storm_table__ = 'foo' > foo_pk = Int(primary=True, sequence_name='foo_seq') > This way, when I insert a new Foo, it will automatically pull from foo_seq > and I don't have to define a trigger. Of course for this to be useful, > other platforms would need to ignore that keyword argument. I'd be willing > to work on this if someone could give me some feedback into the best way to > implement this.
I don't really understand how Oracle works, so I might be off base here, but isn't this a schema management problem? In other words, do you need Storm to issue a particular query whenever you perform an insert to get autoincrement behaviour or do you just need to define a trigger as part of your schema? Thanks, J. -- storm mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm
