Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Older SQLServer support #397

Closed
dale-ackerman opened this issue Mar 27, 2015 · 2 comments
Closed

Older SQLServer support #397

dale-ackerman opened this issue Mar 27, 2015 · 2 comments

Comments

@dale-ackerman
Copy link

I disagree with the decision to only support SQLServer >= 2012. We have corporate legacy data in older SQLServer databases. This effectively says we can't use Rails >= 4.2 Just because of the DB driver. I am pretty sure I can use a verity of versions in Porstgrsql and MySql... Would I have to install an older version of ActiveRecord? Would Rails complain about that? Alternatives would be appreciated...

@metaskills
Copy link
Member

This effectively says we can't use Rails >= 4.2 Just because of the DB driver.

That is correct and I am sorry if the decision puts you off. However, since I have maintained the SQL Server Adapter (around rails v2.1), the largest pain point has always been implementing limit/offset. Sure there are very common windowing functions like ROW_NUMBER and they work – but only for 80% of what is needed to pass ActiveRecord's tests. The hacks needed to pass them entirely have been getting harder and make the adapter brittle along with reducing the capability[1] for this project to move forward. I mentioned some of these points in my blog post and other places before too.

This decision is not done lightly and I believe it is for the best of the adapter project. What many people do not know is that ActiveRecord v4.2 is a DRAMATIC change from v4.1. Not from the public API, but from the internal implementation details. There was a ton of work done in 4.2 to prepare for the massive API changes in 5.0. For example, a new type system. These changes and many more like them are slowly decoupling the ActiveRecord internals to form a strong internal API. Sadly, this sometimes hurts database adapters like this one. In many places we are loosing hooks to do nasty hacks and monkey patches. This is not Rails core or anyone's fault and I agree with their changes. We also work with them closely to move it and us forward when we need special attention too.

I am pretty sure I can use a verity of versions in Porstgrsql and MySql

True. But that is not a fair comparison. Almost every version of the 3 blessed Rails DBs support all the core features needed by ActiveRecord (specfically limit/offset) for as long as I can remember.

Alternatives would be appreciated.

  • Use Rails <= 4.1.
  • If Rails 4.2 is important. Perhaps so important, upgrade SQL Server.
  • Fork this project and maintain v4.2 compatibility using legacy limit/offset methods.

If you or anyone chooses option 3, I will link and promote that code/gem to the best of my ability. But make no mistake, this repo is moving forward without all those hacks and embracing the internal API changes for ActiveRecord adapters by removing our reliance on coupled interfaces within ActiveRecord. So again, sorry you disagree and can't use the v4.2. I am open to to solutions and willing to help where I can.

  • Cheers, Ken

[1] When I say "capability" it is important to understand that this project only has a limited number of maintainers, mostly myself. I was about to give up on it too since I do not use SQL Server at work anymore. If that happened the v4.2 adapter may have never seen the light of day for quite some time. Thankfully with the support of a un-named corporate sponsor, I was brought back in and what you now see is a month and a half of very hard work. None of it would have happened if I had to support the crazy pain I have endured for this project over the past 5 years for limit/offset.

@bf4
Copy link

bf4 commented Jul 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants