REF CURSOR to explicit CURSOR?
Date: Thu, 5 Jul 2001 10:54:29 +1000
Message-ID: <7VO07.4$_W2.904_at_news0.optus.net.au>
Hi people,
I imagine its a pretty strange request but is there anyway to return a REF
CURSOR to an (opened) explicit CURSOR?
We have a lot of packaged explicit cursors and I would like to be able to unit test those cursors in situ.
Eg.
in Package P1 :
CURSOR csrWorkers( pnCompanyKey INTEGER )
IS
SELECT *
FROM COMPANY_WORKERS
WHERE K_COMPANY = pnCompanyKey
ORDER BY S_WORKER_NAME;
and in Package P2 :
PROCEDURE testCursors( psTest VARCHAR2, oCursor OUT tREFCURSOR )
IS
BEGIN
IF psTest = 'Workers' THEN
OPEN oCursor FOR
[OPEN P1.csrWorkers( cntTestCompany )];
ELSE
OPEN oCursor FOR
[OPEN P1.csrOther( cntOtherKey )];
END IF;
END testWorkers;
It seems to me that this would be the best of both worlds - the pre-compiled cursor, the separation of server side logic and the flexibility of typed recordset returns....
Any ideas? Any probability that such a concept will ever be supported?
Thanks for your help,
Lachlan Pitts
mailto:Lachlan_Pitts_at_softworks.com.au
Received on Thu Jul 05 2001 - 02:54:29 CEST