Just a minor addition to https://github.com/jeremyevans/sequel/pull/1312 and why this is not that easy. Oracle's `RETURNING` works a bit differently, specifically the clause does not return a result set to you. Instead it acts as a list of OUT-parameters attached to a query which have to be read after executing the query in a very special manner. These extra parts (binding + reading) just don't exist in the general version of the code and probably should be added there with an empty action by default.
On Monday, February 13, 2017 at 2:04:29 AM UTC+3, Nikita Shilnikov wrote: > > I've found some evidence that RETURNING already existed in 8i which is > enough for not adding a compatibility error FWIW. > https://bitbucket.org/zzzeek/sqlalchemy/issues/1878 > http://www.dba-oracle.com/t_release_dates.htm > > Cheers, > Nikita > > On Monday, February 13, 2017 at 12:57:54 AM UTC+3, Nikita Shilnikov wrote: >> >> OK, that's good. If I get any question about this, I will reach you here >> or on the IRC channel. Otherwise I'll send a PR and we'll discuss the >> details there. >> >> RETURNING was introduced in 10g (released in 2006) so the feature won't >> be available for earlier versions (with a proper error message). >> >> Cheers, >> Nikita >> >> On Monday, February 13, 2017 at 12:21:15 AM UTC+3, Jeremy Evans wrote: >>> >>> On Sunday, February 12, 2017 at 1:08:27 PM UTC-8, Nikita Shilnikov wrote: >>>> >>>> It seems that Sequel doesn't use returning statements and use >>>> home-grown sequence generation instead. I wonder if there is any >>>> particular >>>> reason for querying a sequence after each INSERT statement and not using >>>> RETURNING? I could add support for this feature. >>>> >>> >>> I don't think there is a particular reason. Do you know what versions >>> of Oracle support RETURNING? Assuming Sequel can be setup to only use >>> RETURNING on those versions, and you provide a pull request that implements >>> support and the oracle adapter tests pass with it (rake spec_oracle), it >>> should be able to go in. >>> >>> 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 https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
