Custom backport of unbuffered_row in CI2 |
In a CI2 project I work on, I really need the unbuffered_row() function that exists only in CI3. The project will be migrated to CI3 later this year, but for now I want to add the function in CI2 to address a memory issue. Here are the changes I made. Can someone knowing very well how the database classes works, tell me if those changes will cause problems? Especially the removal of the call to num_rows().
This is what I added to system/database/DB_result.php: PHP Code: public function unbuffered_row($type = 'object') In system/database/DB_driver.php, near the end of the query() function, I removed the call to num_rows() because it fetched all the rows. Also, it's not there in CI3, and for now I haven't seen any problem: PHP Code: // oci8 vars must be set before calling this So, will it work? Thank you for your feedback! PS: I know very well it's a bad idea to make changes to core classes, but it's a temporary fix. The project will be migrated to CI3 later this year.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Messages In This Thread |
Custom backport of unbuffered_row in CI2 - by includebeer - 01-06-2016, 09:07 AM
RE: Custom backport of unbuffered_row in CI2 - by includebeer - 01-06-2016, 11:51 AM
RE: Custom backport of unbuffered_row in CI2 - by includebeer - 01-07-2016, 02:01 PM
|