--- parser3/www/htdocs/Attic/_bug.html 2004/06/23 08:59:52 1.51 +++ parser3/www/htdocs/Attic/_bug.html 2004/08/03 11:18:22 1.61 @@ -1,123 +1,89 @@ +# 20040623 paf@design.ru + +#neptune: parser upgraded, теперь $.bind[ +#$.name[^taint[uri][москва]] придёт в виде %xx%xx... + + @main[] -^connect[oracle://mts_imprimatur2:imp2@mts]{ -# ^in[] -# ^out[] -# ^inout[] -# ^ex[] -# ^ex2[] -# ^ex3[] - ^ex4[] - OK -} +^connect[oracle://igs:pwd@oracle]{ -@inp[] -create table pif(a integer); -create or replace procedure paf(a in integer) as begin -insert into pif (a) values (:a); -end; -/ - -@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[] + + +^rem{ $vars[ - $.ai(2222) - $.ao[sad] + $.puserisn(1) + $.poper[create] + $.pform[name1=value1&name2=value2] + $.pPremium(0) + $.pid(0) + $.pisn(0) ] - ^void:sql{call pafm(:ai,:ao)}[ + ^void:sql{call iagency.doMotorAgr( + :puserisn, -- идентификатор пользователя (страхователя), необходим для создания договора + :poper, -- тип операции calc - расчет премии, create - расчет и создание договора + :pform, -- строка параметров вида параметр=значение&: + :pPremium, -- премия по договору + :pid, -- номер договора (после создания) + :pisn, -- системный номер договора (после создания) + null, -- в текущей версии не используется + null -- в текущей версии не используется + )}[ $.bind[$vars] ] - "$vars.ai" - "$vars.ao" + ^show[puserisn] + ^show[poper] + ^show[pid] + ^show[pisn] +
-# ^string:sql{select a from paf} + OK +} -@inoutp[] -create or replace procedure pafio(aio in out integer) as begin -aio:=aio*2; -end; -/ -@inout[] - $vars[ - $.aio(2222) - ] - before "$vars.aio"
- ^void:sql{call pafio(:aio)}[ - $.bind[$vars] + $varsl[ + $.pname[igs] + $.pwd[create] + $.pisn[x] + $.pres[] ] - after "$vars.aio" -# ^string:sql{select a from paf} + ^void:sql{call iagency.login( + :pname, + :pwd, + :pisn, + :pres + )}[ + $.bind[$varsl] + ] + + $varsl.pisn
+ $varsl.pres
-@exp[] -create or replace procedure pafex is -begin -DECLARE - out_of_stock EXCEPTION; -begin - raise out_of_stock; - end; -end; -/ -@ex[] -^void:sql{ -begin -pafex^; -end^; -} -@ex[] -^void:sql{call pafex()} -@exp2[] -create or replace procedure pafex2 is -begin - raise ZERO_DIVIDE; -end; -/ -@ex2[] -^void:sql{call pafex2()} - - -@exp3[] -create or replace procedure pafex3 is -begin -DECLARE - out_of_stock EXCEPTION; - PRAGMA EXCEPTION_INIT(out_of_stock, -333); -begin - raise out_of_stock; - end; -end; -/ -@ex3[] -^void:sql{call pafex3()} - - -@exp4[] -create or replace procedure pafex4 is -begin - raise_application_error(-20444, 'Salary is missing'); -end; -/ -@ex4[] -^void:sql{call pafex4()} +} +@show[name] +$name=$vars.$name
+ + +@x[] + $MotorBrands[ + $.v[2] + ] + + $a[^table::sql{ + SELECT + isn, + shortname name, + nvl(code,'0') code + FROM + ais.dicti + WHERE + parentisn=:v + and active is not null + ORDER BY + shortname + }[ + $.bind[$MotorBrands] + ] + ]