r58142 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58141‎ | r58142 | r58143 >
Date:16:23, 26 October 2009
Author:freakolowsky
Status:deferred
Tags:
Comment:
Oracle support: added a DB piped function & collection type for getting of DBMS_OUTPUT data trough a standard Oracle SQL query
Modified paths:
  • /trunk/phase3/maintenance/ora/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/ora/tables.sql
@@ -658,3 +658,25 @@
659659 END;
660660 /*$mw$*/
661661
 662+/*$mw$*/
 663+CREATE OR REPLACE TYPE GET_OUTPUT_TYPE AS TABLE OF VARCHAR2(255);
 664+/*$mw$*/
 665+
 666+/*$mw$*/
 667+CREATE OR REPLACE FUNCTION GET_OUTPUT_LINES RETURN GET_OUTPUT_TYPE PIPELINED AS
 668+ v_line VARCHAR2(255);
 669+ v_status INTEGER := 0;
 670+BEGIN
 671+ DBMS_OUTPUT.disable;
 672+ LOOP
 673+ DBMS_OUTPUT.GET_LINE(v_line, v_status);
 674+ IF (v_status = 0) THEN RETURN; END IF;
 675+ PIPE ROW (v_line);
 676+ END LOOP;
 677+ RETURN;
 678+EXCEPTION
 679+ WHEN OTHERS THEN
 680+ RETURN;
 681+END;
 682+/*$mw$*/
 683+

Status & tagging log