|
|
| version 1.50, 2004/06/22 14:15:57 | version 1.80, 2005/01/20 14:10:29 |
|---|---|
| Line 1 | Line 1 |
| @main[] | @main[] |
| ^connect[oracle://mts_imprimatur2:imp2@mts]{ | ^first[] |
| # ^in[] | ^if(def $error){ |
| # ^out[] | ^if(^error.pos[koshmar]>=0){ |
| ^inout[] | $error, TODO:recover |
| OK | }{ |
| $error, TODO:die | |
| } | |
| } | } |
| @first[] | |
| ^second[] | |
| ^if(!def $error){ | |
| working1 | |
| } | |
| @second[] | |
| ^if(^math:random(2)){ | |
| $error[koshmar,test1] | |
| } | |
| ^if(!def $error){ | |
| working2 | |
| @inp[] | ^if(^math:random(2)){ |
| create table pif(a integer); | $error[uzhas,test2] |
| create or replace procedure paf(a in integer) as begin | } |
| insert into pif (a) values (:a); | ^if(!def $error){ |
| end; | working3 |
| / | } |
| } | |
| @in[] | |
| # ^void:sql{create table paf(a clob)} | |
| # ^void:sql{insert into paf (a) values (/**a**/'a')} | |
| # ^void:sql{insert into paf (a) values (:unk)} | |
| ^void:sql{delete from pif} | |
| ^void:sql{call paf(:a)}[ | |
| $.bind[ | |
| $.a[2] | |
| ] | |
| ] | |
| ^int:sql{select count(*) from pif} | |
| "^string:sql{select a from pif}" | |
| # ^string:sql{select a from paf} | |
| @outp[] | |
| create or replace procedure pafm(ai in integer,ao out integer) as begin | |
| ao:=ai; | |
| end; | |
| / | |
| @out[] | |
| $vars[ | |
| $.ai(2222) | |
| $.ao[sad] | |
| ] | |
| ^void:sql{call pafm(:ai,:ao)}[ | |
| $.bind[$vars] | |
| ] | |
| "$vars.ai" | |
| "$vars.ao" | |
| # ^string:sql{select a from paf} | |
| @inoutp[] | |
| create or replace procedure pafio(aio in out integer) as begin | |
| aio:=aio*2; | |
| end; | |
| / | |
| @inout[] | |
| $vars[ | |
| $.aio(2222) | |
| ] | |
| before "$vars.aio"<br> | |
| ^void:sql{call pafio(:aio)}[ | |
| $.bind[$vars] | |
| ] | |
| after "$vars.aio" | |
| # ^string:sql{select a from paf} |