On Friday, July 18, 2014 8:27:23 AM UTC-7, [email protected] wrote: > > >> I'll take another look at the tests but I'm not having much hope. If > >> OpenEdge doesn't support autoincrement that means that even if I > >> override > >> `auto_increment_sql`, it will still fail when attempting to insert > >> anything as the primary key would then always be NULL. > >> > > > > Neither PostgreSQL, Oracle, nor Firebird supports autoincrement, they > all > > use sequences. I'm not sure if OpenEdge uses something similar to > > sequences, but if so, it should be possible to get the tests passing. > If > > there's really no way to insert a row and get back an identifier for the > > row, then yes, it's unlikely it could pass most of the test suite. > > Thought about this too, but apparently not :-/ > > http://stackoverflow.com/questions/9753744/properly-implementing-auto-incrementing-primary-keys-in-openedge-10-2b-using-sql > >
Oracle has similar behavior, where the sequence name must be specified. Sequel's Oracle support comes with an :autosequence Database option that will guess the sequence to use based on the table name, and sets the create_table method to have the table use that sequence. Probably not all that useful in production with a pre-existing database (and therefore off by default), but it allows the tests to run, and works fine for developing new databases. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
