Closed zolrath closed 7 years ago
We are currently working updating the underlying driver Tds to use DbConnection so we can support Ecto 2.0 Not too sure on a timeline yet, there are some challenges involved besides adding the DbConnection behaviour. We need to add support for prepared queries and alter the transaction logic.
We are a .net shop considering a change to elixir and phoenix, but we need to have support for mssql. Do you think this will be available in a near future?
Also interested in a status of this ticket. Thanks!
@mobileoverlord Any documentation or anything to help others get started on helping out?
After a bit of research, I found this that might help. https://github.com/elixir-ecto/ecto/issues/1215
I have some time now to help with porting tds_ecto to Ecto 2.0. How can I help? I can't find any public fork or branch about this
Has there been any further progress on this? Even if work has stalled, we'd love to take a look at what has been done thus far for Ecto 2.0 support to prevent duplication of effort.
I'm curious as well. Would appreciate a response from one of the contributors.
Same here, we would really love to have Ecto 2 support. What can I do to help?
Hello elixir family, sorry for the delay. I'm new here but had the pleasure of meeting with @mobileoverlord to discuss both TDS and TDS.Ecto and some of the changes necessary to support Ecto 2.
I spent a bit of time changing the TDS driver dependency to support all the things Justin mentioned above. I hadn't much experience with SQL Server or any with the TDS Protocol in the past so any comments, suggestions, and pull requests are always greatly appreciated.
There is a new branch on TDS named ecto2 where we will be working on it for now. Please check out the issues tagged ecto2 and create more when you run into them.
There will also be another branch here, named ecto2, where the new Ecto 2 compatible code will be worked on for now. With, again, issues tagged ecto2. The new branch here will be pushed and issues created shortly.
Neither ecto2 branch are ready for production yet. They have however worked together in a small sample application with intermittent issues. Thanks for the support so far and any continued love shown by way of testing, documentation, reporting issues, and friendly emails teaching me things will be met with adoration and appreciation.
Thank you @graves for pushing this work forward :)
Great news! Looking forward to test it and help
Thanks
Thnkas @graves! Will help in any way possible.
Really great news @graves
@graves do you have an estimate as to when we might see a preliminary tds_ecto branch for ecto2?
I received some helpful emails regarding the ecto2 branch of the underlying Tds driver that I've been working on. I wanted it to be stable enough so that it would be simpler for anyone helping to know which project was causing their issue. I've decided to just push the ecto2 branch of tds_ecto tonight so that any obvious unrelated issues can be pointed out or corrected.
@graves just curious how close this is. I tried testing the ecto 2.0 branch, but wasn't able to get tds to return any results. Queries came up empty.
I am having the same issue as @mwood-sqor. I would be willing to help out if needed, just need to know the current status. We would really like to be able to use Ecto 2.0 with SQL Server.
@mkchandler We would definitely welcome any help you would like to provide. @graves has been the main person working on this if you have specific questions.
@ewitchin Sounds good!
@graves Is there a list of blockers for getting Ecto 2 support? I see some issues on this repo and the Tds repo, but if you could give some insight in to what needs some focus, I could try to help.
I'm trying to revive this just in case anyone still needs the adapter
@graves no longer working on this project. We are thin on resources currently to revive this project even though in dire need of ECTO 2 support. We are willing to compensate for time if required to have this completed.
@aknazhansk What's left to do? If someone could provide the list of blockers as asked by @mkchandler I'd be interested in picking this up. I'm no expert on MSSQL but for the sake of completeness it would be good to see TDS support in Ecto 2.
Unfortunately the person managing this is no longer with the company and have not provided the list of blockers, all he said that it was close. Last thing was done is pushed ecto2 branch of tds_ecto I know it is not much but this is all i got. We are unable to reach @graves to get more info. I can help from MSSQL perspective as we have experts here.
Hi @aknazhansk, I spend some time checking tds and tds_ecto repos. First one works, at least all tests are passing, tho they are very basic. Regarding tds_ecto, I see 160+ tests are failing, some are not adopted to ecto2 and some, which should test query preparation, are failing because expecting silly line breaks in SQL query :) but from error message I can see they are built correctly.
Anyhow, I would like to help!
That is excellent news @mjaric ! Please let me know what you need to get started. You may reach out to me directly.
Hi all, I'm planning to finish alpha version next week, probably. Is anybody interested to do alpha testing/upgrade for projects they use? I will definitely need info about version upgrade/migration issues if there is any for existing databases.
BTW, code updates are done in fork I will send pull request to original branch as soon as I'm satisfied with test results
Thanks in advance.
That's great news! We will definitely be testing right away. We have couple projects that are great candidates.
Hi all, there is pull request https://github.com/livehelpnow/tds_ecto/pull/43 for ecto2 support. Untill it is published in hex pm and merged in original repo, please checkout it from my github repository.
It is complete alpha, so please let me know if you find any issues. All features should work except in case of creating indexes. There is no support for includes (....fields...) since ecto does not provide interface to define it (if I'm not wrong) and where
is not yet supported (it will silently skip generating such statement whipe preparing DDL). I will add where support next weak!
Thanks, MJ
One note, I did some testing and apparently tds driver do not operate correctly. It sometimes interpret tds message incorrectly and return empty result instead of expected rows when select statement is executed. it is issue in Tds.Protocol
module somewhere, in call stack, below private function new_data
.
@mjaric First of all thank you for working on integrating this with Ecto2. I can confirm that the driver doesn't play the protocol as it should. For example it doesn't catch the authentication error if there is one - it just stops with the TCP closed
error message (as reported in #38) - for the master branch; for ecto2 it stops with a CaseClauseError. Also, #39 seems to be a protocol related issue.
merged into master
Is there a roadmap for when the MSSQL adapter will gain Ecto 2.0 support? Excited for the changes!
Also, thanks for working on this adapter, I know most of the community gets to use Postgres!