[storm] Sequence support in Storm

Baiju M mbaiju at zeomega.net
Wed Apr 15 22:27:23 BST 2009


Hi,
    I want to use sequence object support provide by Oracle with Storm.
I found an API to support it and implemented in PostgreSQL backed.

The API is like this:

  id = Int(primary=True, default=Sequence("person_seq"))

I just added this to Oracle backend (based on PostgreSQL backend):

@compile.when(Sequence)
def compile_sequence_oracle(compile, sequence, state):
  return "%s.NEXTVAL" % sequence.name

And I got the sequence working.

Now how can we ignore this "default sequence" from other backends.
So, that I can use the same schema with two (or more) backends.
Currently I want use this with MS SQL.

Regards,
Baiju M



More information about the storm mailing list