From: Jure Kajzer Date: Mon, 26 Oct 2009 16:23:46 +0000 (+0000) Subject: Oracle support: added a DB piped function & collection type for getting of DBMS_OUTPU... X-Git-Tag: 1.31.0-rc.0~39103 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=3ba2fb4ad3a23d9ea1b17839d819253177e6deea;p=lhc%2Fweb%2Fwiklou.git Oracle support: added a DB piped function & collection type for getting of DBMS_OUTPUT data trough a standard Oracle SQL query --- diff --git a/maintenance/ora/tables.sql b/maintenance/ora/tables.sql index f7dcad3c06..1e0289356f 100644 --- a/maintenance/ora/tables.sql +++ b/maintenance/ora/tables.sql @@ -658,3 +658,25 @@ BEGIN END; /*$mw$*/ +/*$mw$*/ +CREATE OR REPLACE TYPE GET_OUTPUT_TYPE AS TABLE OF VARCHAR2(255); +/*$mw$*/ + +/*$mw$*/ +CREATE OR REPLACE FUNCTION GET_OUTPUT_LINES RETURN GET_OUTPUT_TYPE PIPELINED AS + v_line VARCHAR2(255); + v_status INTEGER := 0; +BEGIN + DBMS_OUTPUT.disable; + LOOP + DBMS_OUTPUT.GET_LINE(v_line, v_status); + IF (v_status = 0) THEN RETURN; END IF; + PIPE ROW (v_line); + END LOOP; + RETURN; +EXCEPTION + WHEN OTHERS THEN + RETURN; +END; +/*$mw$*/ +