Demonstration of CodeMirror's PLSQL highlighter.

Written by Peter Raganitsch (license), based on John Benediktsson SQL parser.

PROCEDURE generateResult ( pRoutineType IN VARCHAR2 , pReferenceType IN VARCHAR2 , pReferenceId IN NUMBER ) IS ROUTINE_NAME CONSTANT VARCHAR2(30) := 'generateResult'; -- vDisplayAs APEXLIB_V_PAGE_ITEM.DISPLAY_AS %TYPE; vLovQuery APEXLIB_V_PAGE_ITEM.LOV_QUERY %TYPE; vDisplayNullValue APEXLIB_V_PAGE_ITEM.LOV_DISPLAY_NULL%TYPE; vLovNullText APEXLIB_V_PAGE_ITEM.LOV_NULL_TEXT %TYPE; vLovNullValue APEXLIB_V_PAGE_ITEM.LOV_NULL_VALUE %TYPE; vApplicationId APEXLIB_V_PAGE_ITEM.APPLICATION_ID %TYPE; vPageId APEXLIB_V_PAGE_ITEM.PAGE_ID %TYPE; BEGIN ---------------------------------------------------------------------------- -- Determine which routine to call and pass parameters ---------------------------------------------------------------------------- CASE pRoutineType WHEN 'LOV' THEN ApexLib_Lov.generateLovResult( pReferenceType, pReferenceId ); -- WHEN 'COMPUTATION' THEN ApexLib_Computation.generateComputationResult( pReferenceType, pReferenceId ); -- ELSE Apexlib_Error.raiseImplError('Unsupported routine type "'||pRoutineType||'"!'); END CASE; -- EXCEPTION WHEN OTHERS THEN HTP.prn('Error: '||SQLERRM); -- RAISE; no raise, because APEX doesn't care anyway. END generateResult;