-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Port MSSql Database driver from CI3 #503
Comments
Just added limit and offset functionality today. |
That's awesome. If you could submit a Pull Request when you get things working, I'll get started trying to make TravisCI get a unix-version of it setup, now that they support that. That way live database tests can be ran against it during the automated tests. |
Sorry, I did a/the SQLSrv driver and not MSSQL. I'm sure they're probably close in terms of what I have done. I can look into it and see how different it is. |
Oh, no problem. Eventually SQLSrv is on the list, but MSSQL is one of the most used historically, so we wanted that to be one of the first batch ready for the Alpha/Beta. |
@JakeAi Are you still working on this feature or you drop the idea? |
@jaynarayan89 Yes, I am. I am using it in my own application. It would need more further testing as I'm only using it for reads right now. But I need to finish my app first before I can do that, and I don't see that happening anytime soon. I can PR it and someone can further check it out? |
I would like to help, so I asked before starting it from scratch. |
@jaynarayan89 oh, right on! I thought you might have been a "moderator" or something lol. I can send you what I have and you can check it out and further work on it? |
Oh, also. This is SQLSrv and not MSSQL. I thought they were the same thing at the time. I honestly don't know the difference. I'm using it with SQL Server 2012 and Microsofts sqlserver drivers for php. |
ok , that would be great. |
@jaynarayan89 cool, I'm glad I didn't waste time with it then. @lonnieezell should read this and maybe remove MSSQL from the project all together then. |
@jaynarayan89 https://github.com/JakeAi/CI4-SQLSRV/blob/master/Builder.php#L53 this function was made by me to implement limit and offset. The fetch next is only supported in 2012 I believe. Just a warning! |
@JakeAi arer you on codeigniter slack channel. If I need something to understand I will pm you there. |
@jaynarayan89 No I am not. You can facebook message me or google hangouts. |
@jaynarayan89 how is this driver coming? |
@JakeAi Actually I was busy with other issues so did not started yet.I will start working on this issue next month because our new year is next week and Diwali festival has been started from today. And as a bonus my exams are going to start on 25th. |
Should the driver be based on PDO or SQLSRV? The mssql_pconnect & mssql_connect are depreciated. |
@trafficinc Microsoft has SQLSRV and PDO SQLSRV drivers. I think there should be one for each. MSSQL should go away. |
@JakeAi This is good work, but then an little correction, |
Ok, I may try to work on a PDO solution, I need this for one of my projects |
@kovijanny what? |
@JakeAi this is https://github.com/JakeAi/CI4-SQLSRV/blob/d1fe0eb43889bf81e478fc76862e1e86970a439e/Connection.php#L349 |
@kovijanny I made this for my project and only went far enough to make it work. @jaynarayan89 was going to pick up where I left off. |
Sorry, |
@qury Sorry, I mean I can't find your port at the new/sqlsrv repo. |
@fdurantelp , @nfaiz Sorry, it was my bad, it is a new fork and i was experimenting with signed commits, which apparently did not work out as i've expected. However the driver is there now: |
Thanks! |
(* thanks for continue the work :) |
Thanks @puschie286 , i've updated that, and have started adding schema support as well (current code was using 'dbo' most of the time). Remaining issues to fix: |
For some reason MetadataTest failes if i run the all the live tests, however it passes if i run only the MetadataTest.php |
Just an update: replace() is implemented finally (it is ugly though) https://gist.github.com/qury/2cbbe5d8748aace511a1c2f78d9fdc6c |
@qury That's awesome to hear! We will be releasing 4.1 later this year and were hoping to get this and the Oracle drivers tested and in place for that release. Thanks so much for this port. |
@qury Spread operator support in array is for PHP 7.4 and later? Btw good job so far. |
Thanks! I will re-write that. (not to self: don't skip coffee) |
progress update:
@nfaiz I've replaced array spread with array_merge. |
hi, If you need any specific help, maybe you can point that out and maybe i will be able to find a free minute to help out with it. Thanks |
@davislasis I will pick up development on it again in 2 weeks |
Hi @qury - I'm afraid I haven't looked at it directly since I don't have a MSSQL database handy, but I see you've spent a lot of time on it. Have you made any more progress since the last comment? When you think it is close, open a PR here so we can start reviews and it can run tests against the main repo. |
@MGatner , i've just updated my fork, there are still a few issues so i'm catching up on them. Will submit a PR soon. |
For what it's worth, I have began to use @qury 's branch to work with a MS database, and so far so good. It's true my requests are quite simple at the moment... Thanks for the work. I am eagerly waiting for a merge. |
I'm looking forward :) |
I've created a PR, i'm sure the port could be further refined, but i think it is at a stage where it is usable enough. |
@qury I'm having issues using prepared query, it's expecting Closure but Query is being passed. Any idea? Thanks in advance. |
Are you using my out of date driver or the one that was cleaned up/completed by michalsn and is merged into CI4 develop branch? Also would be nice to see what you are trying to do and what the error message is. |
I'm using yours and nope I haven't checked @michalsn - I'll take a look as well I'm trying execute this line of code:
but it's returning error:
|
Well at this stage you should check out the development branch of Codeigniter4 as the driver has been merged |
ok thanks @qury |
Hi. Recently the handler for sqlsrv has been incorporated into the develop version of codeigniter, doing some tests I have not been able to configure the settings for the use of schemas, everything is being stored in dbo. and for example I have different schemes like adm, transactios, blgs etc. anyone have any idea how to solve this problem. |
@hdrodriguez you're probably better off asking for help on the forums or Slack |
@lonnieezell I think this can be closed already as the |
No description provided.
The text was updated successfully, but these errors were encountered: