Proposed solution for OCI8 insert_id() - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Proposed solution for OCI8 insert_id() (/showthread.php?tid=39311) |
Proposed solution for OCI8 insert_id() - El Forum - 03-07-2011 [eluser]Unknown[/eluser] Hello, I am a codeigniter beginner, working my way from creating my own collection of scripts to a framework for RAD, and I chose CI, for usability and speed. Because of my infrastructure, I am required to use oracle for my web db development, which has been pretty good while developing with CI, except for one area, insert_id(), because oracle does not have an auto-increment column type I had a few hackish ways of getting around this , like calling select statements of sequences prior to insert that had no triggers, but today really refined a perfect way to return the id on an oracle insert(after creating a sequence and trigger). Code: $link = oci_connect($db_schema, $db_psw, $conn); My concern is this...The current oci_driver.php has the insert_id() function listed as "unsupported" , and I would love to roll the above solution into the oci_driver, but understand I should not make changes to the database libraries because they will get overwritten during CI upgrades. Is it possible if I or anyone else tuned the above syntax to fit the oci and db drivers, that the CI library would incorporate that change? I know that there arent many of us oracle devs out there, but this would be a massive win for the few and proud Thanks for any thoughts Proposed solution for OCI8 insert_id() - El Forum - 03-07-2011 [eluser]WanWizard[/eluser] Fork the reactor code, make your modifications to the OCI driver, and push your changes back. If it's good, I'm sure they would accept it. |