[storm] Oracle sequence columns
Jason Baker
jbaker at zeomega.com
Fri Dec 4 22:43:44 GMT 2009
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/storm/attachments/20091204/9a9df688/attachment.htm
More information about the storm
mailing list