试了很久,procedure的odata直接执行貌似没办法更新
只有借用POST才可以更新
procedure的写法如下:
PROCEDURE "DEMO"."matinal.pro::zpro1" (IN new "matinal.data::ztable2",OUT error "matinal.data::error"
) LANGUAGE SQLSCRIPTSQL SECURITY INVOKER DEFAULT SCHEMA DEMOAS
BEGIN
/***************************** Write your procedure logic *****************************/select MY_COL1, MY_COL2, MY_COL3 from :new;error = select '0' as ERROR_ID, 'value as empty' as COMMENT from dummy;INSERT INTO "DEMO"."matinal.data::ztable2"(MY_COL1, MY_COL2, MY_COL3) VALUES('1001',1,'test');
END;
Odata的写法如下:
service namespace "ztest" {"matinal.views::zcal1" as "zcal1"create using "matinal.pro::zpro1";
}
借助POST更新即可,否则不会更新。