Re: [sqlalchemy] Sequences in Oracle RAC out of order

2017-07-03 Thread Mike Bayer
On Mon, Jul 3, 2017 at 7:57 AM, David Moore wrote: > I understand this is done for performance reasons, and in the very common > case that all you want from your Sequence is to autogenerate a unique id, > it's absolutely fine. However, it would be nice to have an option to >

[sqlalchemy] Sequences in Oracle RAC out of order

2017-07-03 Thread David Moore
Hello, I just chased down a bug in our application while using SQLAlchemy 1.0.6 in an Oracle RAC environment, which should probably be in SQLAlchemy documentation somewhere, and possibly motivate a change to the options for sequence creation on Oracle. Basically, our application assumes a

Re: [sqlalchemy] Sequences, Primary Keys, Relations

2012-02-25 Thread Adam Tauno Williams
On Thu, 2012-02-23 at 14:49 -0500, Adam Tauno Williams wrote: I have a database where multiple objects use the same sequence to generate primary keys - class ProjectInfo(Base, KVC): __tablename__ = 'project_info' object_id = Column(project_info_id, Integer,

[sqlalchemy] Sequences, Primary Keys, Relations

2012-02-23 Thread Adam Tauno Williams
I have a database where multiple objects use the same sequence to generate primary keys - class ProjectInfo(Base, KVC): __tablename__ = 'project_info' object_id = Column(project_info_id, Integer, Sequence('key_generator'),

Re: [sqlalchemy] Sequences, Primary Keys, Relations

2012-02-23 Thread Claudio Freire
On Thu, Feb 23, 2012 at 4:49 PM, Adam Tauno Williams awill...@whitemice.org wrote: This works fine.  But if I create a Project object I can't relate it to a ProjectInfo object within the same transaction without calling flush() first.  Is there some way to encourage SQLalchemy to allocate a

Re: [sqlalchemy] Sequences, Primary Keys, Relations

2012-02-23 Thread Michael Bayer
On Feb 23, 2012, at 2:49 PM, Adam Tauno Williams wrote: I have a database where multiple objects use the same sequence to generate primary keys - class ProjectInfo(Base, KVC): __tablename__ = 'project_info' object_id = Column(project_info_id, Integer,

[sqlalchemy] Sequences support for CYCLE and MIN/MAX values

2010-03-26 Thread Kent
Any plans to support MINVALUE, MAXVALUE, CYCLE, NOCYCLE for sequences (for both postgres and oracle)? I've implemented a subclass of Sequence myself, but it isn't very elegant, because I'm not familiar enough with the code to know which methods to override for create() output. -- You received

Re: [sqlalchemy] Sequences support for CYCLE and MIN/MAX values

2010-03-26 Thread Michael Bayer
Kent wrote: Any plans to support MINVALUE, MAXVALUE, CYCLE, NOCYCLE for sequences (for both postgres and oracle)? I've implemented a subclass of Sequence myself, but it isn't very elegant, because I'm not familiar enough with the code to know which methods to override for create() output.

Re: [sqlalchemy] Sequences support for CYCLE and MIN/MAX values

2010-03-26 Thread Michael Bayer
Kent wrote: Any plans to support MINVALUE, MAXVALUE, CYCLE, NOCYCLE for sequences (for both postgres and oracle)? I've implemented a subclass of Sequence myself, but it isn't very elegant, because I'm not familiar enough with the code to know which methods to override for create() output.

Re: [sqlalchemy] Sequences support for CYCLE and MIN/MAX values

2010-03-26 Thread Kent Bower
Thanks for the info. Since it is NOCYCLE in oracle and NO CYCLE in postgres, I would check the engine.dialect.name in the compile, method correct? if eng.dialect.name == 'oracle': sql += NOCYCLE elif eng.dialect.name ==

[sqlalchemy] Sequences

2007-06-15 Thread voltron
Could someone point me to the documentation about declaring and using Sequence fields in Sqlalchemy? If there are no docs, could someone give a rundown? I can imagine how it could be used, but I´ll be working in the dark without documentation. Thanks