-
Notifications
You must be signed in to change notification settings - Fork 21
Replace Mysqli with DBAL? #149
Comments
There were some thoughts on replacing Mysqli with PDO in the past. I'm all in favor of making Pheasant less dependent on MySQL (read: db independent). I'm not familiair with Doctrine's DBAL project, what does it do? And what are the pros/cons versus vanilla PDO? |
DBAL is a database abstraction layer, where as PDO is just a connection abstraction layer. DBAL will actually rewrite SQL to suit different database engines. Beyond that DBAL offers a nice connection api that would replace a lot of code in Pheasant, including things like better transaction handling and nice extras like sharding and caching. |
If we want Pheasant to support more database backends, writing all that code ourselves wouldn't add much value. It just adds a bunch of complexity on our side which we have to test and maintain. I'm all in favor of using a 3rd party library to keep our own code base small. Again, not familiar with the specifics of the Doctrine's DBAL project, but Doctrine seems well tested and has a lot of eyes looking at it. What are the implications of such a change in terms of performance and Pheasants public API? |
Hmmm, it depends. I'd say the biggest impact would be that we expose the classname of |
Performance implications would be minimal, and it would have huge security upside in that parameter binding could be moved into DBAL/pdo. |
I'd say go for it 👍 |
I'm for this change 👍 . After adding in |
@lox, any progress on this? |
@lox, can you push this to a separate branch? I have some time to work on this. |
We've done some work to replace the Mysqli parts of Pheasant with Doctrine's DBAL project. Thoughts on whether this is something we'd want to do for 2.0?
The text was updated successfully, but these errors were encountered: