[eluser]duartix[/eluser]
I've managed to get all of the transactional (inserts, updates and deletes) bit of my ORACLE application to execute on the database through stored procedure executions on packages, called by CI's models. This is very important because it relegates data access permissions to the roles that grant those packages' execution rights.
However, my queries are still running directly on the tables via direct SELECTs through CI's models. Basically I don't know how to read an ORACLE cursor into a CodeIgniter's model, but I'm willing to push all those SELECT's to the DB because it will make the application more consistent, easier to manage and easier to maintain (the rest of the team is a lot more proficient on PL/SQL than PHP)
Does anyone have a light on how to do this?
The DB part would be along these lines:
Code:
CREATE OR REPLACE PACKAGE test_pack IS
TYPE dataCursor IS REF CURSOR;
PROCEDURE retrieve_DATA (p_cursor IN OUT dataCursor);
END test_pack;
CREATE OR REPLACE PACKAGE BODY test_pack IS
PROCEDURE retrieve_DATA ( p_cursor IN OUT dataCursor) IS
BEGIN
OPEN p_cursor FOR
select * from my_table;
END retrieve_DATA;
END test_pack;
Thank you in advance.