chuckf Posted August 14, 2009 Share Posted August 14, 2009 IPB 3 provides the framework for some pretty sophisticated applications. I'm working on one myself now and realized I could save myself some work and headaches if IPB would support transactions. I searched classDb, classDbMysql, and classDbMysqlClient but didn't find methods resembling 'start transaction', 'commit' or 'rollback'. I was going to use the mysqli api directly for this functionality but I can't use the 'connection_id' since it's protected. So does IPS have any plans to add support for transactions? Or at least provide a getter for the connection_id? Link to comment Share on other sites More sharing options...
bfarber Posted August 14, 2009 Share Posted August 14, 2009 I'd guess it's unlikely we'd add transaction support into IPB, but I don't see why there couldn't be a getter for the connection_id really. Link to comment Share on other sites More sharing options...
chuckf Posted August 14, 2009 Author Share Posted August 14, 2009 I don't understand why it's unlikely you'll add transaction support but I'm grateful you are considering adding the getter for the connection_id. If you do add the getter can you also provide a method that will return the api type in use (i.e. mysql, mysqli, etc.)? Link to comment Share on other sites More sharing options...
Management Charles Posted August 14, 2009 Management Share Posted August 14, 2009 Transaction support requires MyISAM tables in MySQL which most people don't use so it's not really worth the development time for the small subset that would use it :) Link to comment Share on other sites More sharing options...
chuckf Posted August 14, 2009 Author Share Posted August 14, 2009 [quote name='Charles' date='14 August 2009 - 12:55 PM' timestamp='1250268944' post='1843699'] Transaction support requires InnoDB tables in MySQL which most people don't use so it's not really worth the development time for the small subset that would use it I understand your logic. However, please consider that perhaps the reason InnoDB isn't used much is because it was not only hard to make apps for IPB but also because IPB didn't support the features that InnoDB provides. Now that you've made it pretty easy to make IPB apps I think InnoDB use would grow if you supported those features like transactions. In the app I'm writing now I'm using InnoDB tables primarily for their foreign key support. This makes coding routines that delete records in a parent table easy as the engine automatically deletes corresponding records in child tables. As to the development time required; I'm not privy to your development cycle protocols but considering it would only require 3 wrapper methods, 'beginTransaction', 'commit', and 'rollback' I figure I could knock it out in an hour or two for mysql. Link to comment Share on other sites More sharing options...
bfarber Posted August 14, 2009 Share Posted August 14, 2009 We also offer MSSQL driver, and the driver methods have to be consistent. Given that *we* won't use the methods, that "hour or two" (for mysql alone) would be better spent on other features that would be widely used. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.