亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? generator_api.htm

?? Oracle PL/SQL procedure generator (second generator type)
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
You can specify the descriptor column(s) for a table with the OIR's setdescindex procedure: <DIR>
<DIR>

<FONT FACE="Courier,Courier New" SIZE=1><P>PROCEDURE setdescindex <BR>
   (drv IN VARCHAR2,<BR>
    tab IN VARCHAR2, <BR>
    unique_index IN VARCHAR2 := NULL, <BR>
    sch IN VARCHAR2 := NULL); </DIR>
</DIR>

</FONT>
<P>
You can provide one of the following entries for the unique index: 

<UL>
<LI>The name of the unique index. </LI>
<LI>The name of the leading column in the index. </LI>
<LI>NULL, which means that the first unique index that is <I>not</I> associated with the primary key will be used.</LI>
</UL>

<P>
The following call to this program defines ename as the descriptor column of emp: <DIR>
<DIR>

<FONT FACE="Courier,Courier New" SIZE=1><P>PLGdoir.setdescindex (PLGte.driver, 'emp', 'ename'); </DIR>
</DIR>

</FONT>
<P>
If you specify a descriptor index for a table, PL/Generator will create functions that return the primary key for a given descriptor and vice-versa. This primary key descriptor column(s) will also be used when processing foreign key information in other tables. 
<P>
&nbsp; 

<B><I><P><A NAME="Primary">The Update Primary Key Procedure</P>
</B></I></FONT><FONT SIZE=2><P>In most schemas, you will not want to let developers update primary key values. If, on the other hand, you do require this capability, you can ask PL/Generator to created a procedure specifically for this purpose by calling the following program:</P>
</FONT><PRE>
 PROCEDURE PLGdoir.setupdpky 
    (drv IN VARCHAR2, 
     tab IN VARCHAR2, 
     sch IN VARCHAR2 := NULL); </PRE><DIR>

<FONT SIZE=2><P>where drv is the driver (PLGte.driver if you are performing table encapsulation), tab is the name of the table or database object to which the action is applies, sch is the schema to which the action applies. </P></DIR>

<P>If you want, for example, to request an update of the primary key of the Salary History table in the APPDEV schema, you would execute this command:</P>
</FONT><PRE>
 SQL&gt; exec plgdoir.setupdpky (plgte.driver, 'salhist', 'appdev') </PRE>
<FONT SIZE=2><P>Once this command is COMMITTed to the database, you can generate code from the screen interface and this new setting would be applied.</P>
<P>Note: the Update Primary Key procedure does <I>not</I> at this time perform a cascading update to the foreign keys of all tables referencing that primary key.</P>


<B><FONT  SIZE=4><P><A NAME="ColumnCharacteristics">Setting Column Characteristics</A> </B></FONT>
<P>
You can set the following characteristics of code associated with the columns of a table: 

<UL>
<LI>Hide columns which you do not want to appear in the API. </LI>
<LI>Specify the columns for which individual update procedures and query functions should be defined. </LI>
<LI>Assign a function to be applied to the column before any updates or inserts.</LI>
</UL>

<B><I><P><A NAME="HidingColumns">Hiding columns</A> </B></I>
<P>
Sometimes you have columns in a table that are no longer used. You can hide these columns so that they will not appear in the parameter lists of any packaged interface programs by calling the hidecol procedure: <DIR>
<DIR>

<FONT FACE="Courier,Courier New" SIZE=1><P>PROCEDURE PLGdoir.hidecol <BR>
   (drv IN VARCHAR2,<BR>
    tab IN VARCHAR2, <BR>
    col IN VARCHAR2, <BR>
    sch IN VARCHAR2 := NULL); </DIR>
</DIR>

</FONT>
<P>
In the following example I hide the mgr column of the emp table. <DIR>
<DIR>

<FONT FACE="Courier,Courier New" SIZE=1><P>PLGdoir.hidecol (PLGte.driver, 'emp', 'mgr'); </DIR>
</DIR>

</FONT><B><I>
<P>

<A NAME="IndividualColumns">Updating individual columns</A> </B></I>
<P>
PL/Generator generates update procedures to perform UPDATEs. The default architecture is a single PKG.upd procedure that can update any or all non-primary key columns. You can also request that an update procedure be generated for one or more single columns. You might want to do this to keep constraint and trigger processing to a minimum (the single PKG.upd program will update a column to its current value if you are not actually changing its value; i.e., if you pass in NULL). 
<P>
Call the updatecol procedure shown below to specify that one or more columns should have their own update procedures: <DIR>
<DIR>

<FONT FACE="Courier,Courier New" SIZE=1><P>PROCEDURE PLGdoir.updatecol (<BR>
   drv IN VARCHAR2,<BR>
   tab IN VARCHAR2, <BR>
   col IN VARCHAR2, <BR>
   sch IN VARCHAR2 := NULL); </DIR>
</DIR>

</FONT><P>In the following example I request that the sal column of the emp table have its own update program: <DIR>
<DIR>

<FONT FACE="Courier,Courier New" SIZE=1><P>PLGdoir.updatecol (PLGte.driver, 'emp', 'sal'); </DIR>
</DIR>

</FONT><B><I><P><A NAME="ApplyingFunctions">Applying functions to columns</A> </B></I>
<P>
</B></I></FONT><FONT SIZE=2><P>PL/Generator allows you to specify a function that is to be applied to a value before it is assigned to a column in an INSERT or UPDATE statement. You can ask that the entire value intended for the column be replaced with another value or expression. This is useful when you want to </FONT><A HREF="#Defining"><FONT SIZE=2>define standard audit columns on a table</FONT></A><FONT SIZE=2>. </P>
<P>If you want the column to be set according to the string in the Function field, simply preface your text with a "*". For example, if you want a particular date column to always be set to SYSDATE, place this text in the Function field on the Columns screen for that table:</P><DIR>

</FONT><FONT FACE="Courier New" SIZE=2><P>*SYSDATE </P></DIR>

</FONT><FONT SIZE=2><P>Suppose that you want to do something a bit more complex, such as automatically populate one column with the value from another column. In this case, you will want to specify a function string as a replacement with the *, but you also will need to be careful about how you specify the original column from which the new value is derived. Consider a table that contains two columns: NAME and UC_NAME. The UC_NAME column always must contain the upper-case version of the NAME column. The function specification in the Columns screen should then be:</P><DIR>

</FONT><FONT FACE="Courier New" SIZE=2><P>*UPPER(&lt;parameter for NAME&gt;) </P></DIR>

</FONT><FONT SIZE=2><P>where &lt;parameter for NAME&gt; is the name of the parameter containing the value intended for the NAME column. The default format for that parameter is "NAME_IN", but you can alter the prefix and suffix in the Coding Standards screen. Assuming that you have relied on the defaults, your entry for the Function for UC_NAME would then be:</P><DIR>

</FONT><FONT FACE="Courier New" SIZE=2><P>*UPPER(name_in) </P></DIR>

</FONT><FONT SIZE=2><P>If you decide to use a prefix of "i_" for IN parameters, then you would supply this value for the Function:</P><DIR>

</FONT><FONT FACE="Courier New" SIZE=2><P>*UPPER(i_name) </P></DIR>

</FONT><FONT SIZE=2><P>A future release of PL/Generator may provide a way to automatically determine the appropriate parameter name for you, but that is not currently available.</P>


<B><I><P><FONT SIZE=4><A NAME="Defining">Defining Standard Audit Columns </P>
</B></I></FONT><FONT SIZE=2><P>A common requirement with database tables is to add a set of audit columns keep tracking of who inserted when and who changed when. The demonstration tables (tedemo.sql in the demo subdirectory) all contain such fields. Here, for example, is the definition of the department table:</P>
</FONT><FONT SIZE=3><PRE>
 CREATE TABLE DEPARTMENT ( 
   department_id  NUMBER(2), 
   name           VARCHAR2(14), 
   loc_ID         NUMBER(3) 
   ,created_by    VARCHAR2(100) DEFAULT USER 
   ,created_on    DATE DEFAULT SYSDATE 
   ,changed_by    VARCHAR2(100) DEFAULT USER 
   ,changed_on    DATE DEFAULT SYSDATE         
   ); </PRE>
<FONT SIZE=2><P>As you can see, I have defined default values for these rows which will handle values on INSERT, but not UPDATE. I want to make sure that whenever one of these DML actions take place through the table encapsulation package, the changed_by and changed_on audit columns are updated automatically. I also want to make sure that the created columns are not modifiable through the generated package.</P>
<P>To accomplish this, I will take the following actions:</P>
<OL START=0>

<LI>Hide the created_by and created_on columns. Their values are populated automatically at the database level. </LI>
<LI>Set the function value for each of the changed fields to an <I>override</I> value. </LI></OL>
</OL>
</OL>

<P>To do this for a single table, simply open up the Columns screen for that table and change the entry for the Hide field for the two created columns to YES. Then for the changed columns, enter values in the Function field for each of the columns as shown below:</P></DIR>
</DIR>
</FONT>
<P ALIGN="CENTER"><CENTER><TABLE BORDER CELLSPACING=1 BORDERCOLOR="#000000" CELLPADDING=7 WIDTH=532>
<TR><TD WIDTH="55%" VALIGN="TOP"><DIR>
<DIR>
<DIR>

<P><B><FONT SIZE=2>Column Name</DIR>
</DIR>
</DIR>
</B></FONT></TD>
<TD WIDTH="45%" VALIGN="TOP"><DIR>
<DIR>
<DIR>

<B><FONT SIZE=2><P>Function</DIR>
</DIR>
</DIR>
</B></FONT></TD>
</TR>
<TR><TD WIDTH="55%" VALIGN="TOP"><DIR>
<DIR>
<DIR>

<FONT SIZE=2><P>changed_on</DIR>
</DIR>
</DIR>
</FONT></TD>
<TD WIDTH="45%" VALIGN="TOP"><DIR>
<DIR>
<DIR>

<FONT SIZE=2><P>*SYSDATE</DIR>
</DIR>
</DIR>
</FONT></TD>
</TR>
<TR><TD WIDTH="55%" VALIGN="TOP"><DIR>
<DIR>
<DIR>

<FONT SIZE=2><P>changed_by</DIR>
</DIR>
</DIR>
</FONT></TD>
<TD WIDTH="45%" VALIGN="TOP"><DIR>
<DIR>
<DIR>

<FONT SIZE=2><P>*USER</DIR>
</DIR>
</DIR>
</FONT></TD>
</TR>
</TABLE>
</CENTER></P>

<FONT SIZE=2><P>The use of the leading asterisk tells PL/Generator to use this value <I>in place of</I> any value provided, including NULL.</P>
<P>You can also set these values as the standard throughout your entire schema by issuing these commands directly through the API:</P>
<DIR>
</FONT><PRE>
PLGdoir.setcolfunc (PLGte.driver, PLGdoir.c_global, 'changed_on', '*SYSDATE'); 
PLGdoir.setcolfunc (PLGte.driver, PLGdoir.c_global, 'changed_by', '*USER'); </PRE>
</DIR>
<FONT SIZE=2><P>By specifying PLGdoir.c_global for the table name, you are asking that this action be applied immediately to all tables currently defined in the schema. It is not currently possible to make this global setting through the screen interface.</P>
<P>Ideally, when you take this approach, you would also like to hide these columns from the user. While PL/Generator lets you hide columns (removing them from the parameter list), it will also remove those columns from the INSERT and UPDATE statements, which you do not want.</P>
<P>So at least in the current version of PL/Generator, you will need to keep these columns "exposed". They will, however, have a default value of NULL and can be ignored when calls to the update and insert procedures are made.</P>
<P>Consider the loc table in the demonstration script. After generating a package for loc and specifying audit fields as described above, I end up with this update procedure:</P>
</FONT><PRE>
    PROCEDURE te_loc.upd ( 
       loc_id_in IN loc.loc_id%TYPE, 
       regional_group_in IN loc.regional_group%TYPE DEFAULT NULL, 
       changed_by_in IN loc.changed_by%TYPE DEFAULT NULL, 
       changed_on_in IN loc.changed_on%TYPE DEFAULT NULL, 
       rowcount_out OUT INTEGER, 
       reset_in IN BOOLEAN DEFAULT TRUE 
       ); </PRE>
<FONT SIZE=2><P>Suppose that I want to update the regional group for location 10. I would need to write code like this:</P><DIR>
</FONT><PRE>
 DECLARE 
    numupd INTEGER; 
 BEGIN 
    te_loc.upd (10, 'New Region Group', rowcount_out =&gt; numupd); 
 END; </PRE></DIR>
<FONT SIZE=2><P>Notice that I use named notation (=&gt;) to skip over the audit fields and provide the OUT variable needed to determine how many rows I had updated successfully.</P>


</FONT><B><FONT  SIZE=4><P><A NAME="ErrorHandling">Setting Error Handling</A> 
</FONT><I>
<P>
<A NAME="HandlingMethod">Setting the exception handling method</A> 
</B></I>
<P>
PL/Generator supports three styles of exception handling: 

<TABLE CELLSPACING=0 BORDER=0 CELLPADDING=7 WIDTH=710>
<TR><TD WIDTH="40%" VALIGN="TOP">
<P>PL/Vision- based exception handling</TD>
<TD WIDTH="60%" VALIGN="TOP">
<P>Exceptions raised in the program are logged through a call to PLVexc.recNgo. The error is then re-raised. This is the recommended approach for normal PL/SQL development.</TD>
</TR>
<TR><TD WIDTH="40%" VALIGN="TOP">
<P>Normal PL/SQL exception handling</TD>
<TD WIDTH="60%" VALIGN="TOP">
<P>Exceptions raised in the programs are propagated out of those programs. Use this approach if you do not want to take advantage of PL/Vision exception handling features like Bailout and standardized logging.</TD>
</TR>
<TR><TD WIDTH="40%" VALIGN="TOP">
<P>Status return codes</TD>
<TD WIDTH="60%" VALIGN="TOP">
<P>Rather than propagate exceptions, the programs return status information (error code and error message) in the parameter list. This is useful when your PL/SQL programs are called from a non-PL/SQL environment such as Powerbuilder or Pro*C.</TD>
</TR>
</TABLE>

<P>You will call one of the following programs to set the exception-handling style in your packages: <DIR>
<DIR>

<FONT FACE="Courier,Courier New" SIZE=1><P>PROCEDURE setpsexc (<BR>
   drv IN VARCHAR2,<BR>
   tab IN VARCHAR2, <BR>
   raisemech IN VARCHAR2 := NULL,<BR>
   handlemech IN VARCHAR2 := NULL,<BR>
   sch IN VARCHAR2 := NULL);  
<P>PROCEDURE setplvexc (<BR>
   drv IN VARCHAR2,<BR>
   tab IN VARCHAR2, <BR>
   raisemech IN VARCHAR2 := NULL,<BR>
   handlemech IN VARCHAR2 := NULL,<BR>
   setcontext IN BOOLEAN := FALSE,<BR>
   sch IN VARCHAR2 := NULL); 
<P>PROCEDURE setretcd (<BR>
   drv IN VARCHAR2,<BR>
   tab IN VARCHAR2, <BR>
   raisemech IN VARCHAR2 := NULL,<BR>
   handlemech IN VARCHAR2 := NULL,<BR>
   successval IN VARCHAR2 := 0,<BR>
   failureval IN VARCHAR2 := NULL, /* = SQLCODE */<BR>
   failuremsg IN VARCHAR2 := NULL, /* = SQLERRM */<BR>
   sch IN VARCHAR2 := NULL);  </DIR>
</DIR>

</FONT><P>Suppose that I wanted to use the return code approach for the items table. I would then issue this command (most likely in my teinit.sql script): <DIR>
<DIR>

<FONT FACE="Courier,Courier New" SIZE=1><P>PLGdoir.setretcd (PLGte.driver, 'items'); </DIR>
</DIR>

</FONT><P>It is most likely, however, that I will be using the same approach for all tables in my schema. Rather than repeat the above command for each table, I can issue a single call. In the following example, I specify PL/Vision exception handling for all tables in the SCOTT schema: <DIR>
<DIR>

<FONT FACE="Courier,Courier New" SIZE=1><P>PLGdoir.setplvexc (PLGte.driver, PLGdoir.c_global); </DIR>
</DIR>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲电影一级片| www.成人在线| 日韩午夜三级在线| 色欧美乱欧美15图片| 国产精品自拍av| 奇米精品一区二区三区在线观看| 中文字幕的久久| 日本一区免费视频| 精品美女一区二区| 欧美一区午夜精品| 欧美精品成人一区二区三区四区| 91视视频在线观看入口直接观看www| 亚洲成人你懂的| 中文字幕久久午夜不卡| 久久综合一区二区| 国产亚洲精品资源在线26u| 精品区一区二区| 2017欧美狠狠色| 久久嫩草精品久久久久| 欧美日韩激情在线| 欧美在线影院一区二区| 在线观看国产日韩| 欧美午夜精品免费| 91精品国产综合久久小美女| 717成人午夜免费福利电影| 欧美日韩国产123区| 69堂国产成人免费视频| 日韩一区二区三区三四区视频在线观看| 欧美日韩国产三级| 欧美日韩国产综合一区二区| 欧美久久婷婷综合色| 欧美精品xxxxbbbb| 欧美精品一区二区三区高清aⅴ| 欧美一区二区三区在| 欧美乱熟臀69xxxxxx| 欧美一区二区黄色| 久久久久亚洲蜜桃| 中文字幕欧美一| 亚洲一区二区三区四区五区中文| 亚洲欧洲日本在线| 五月天欧美精品| 国内精品伊人久久久久av影院| 国产盗摄一区二区三区| 国产一二精品视频| 99热国产精品| 91精品国产综合久久久蜜臀图片| 欧美www视频| 亚洲欧美国产三级| 亚洲成人你懂的| 国产麻豆欧美日韩一区| 91看片淫黄大片一级在线观看| 欧美日韩国产区一| 日韩一级黄色大片| 日本一区二区三区电影| 亚洲高清免费观看| 国产乱人伦偷精品视频不卡 | 国产不卡视频在线播放| 99精品视频中文字幕| 欧美日韩一级大片网址| 国产欧美一区二区精品性色超碰| 亚洲欧美日韩一区| 国产高清在线观看免费不卡| 色女孩综合影院| 久久众筹精品私拍模特| 亚洲综合在线观看视频| 国产一区二区三区在线观看免费 | 在线视频欧美精品| 久久夜色精品国产欧美乱极品| 亚洲精品视频自拍| 国产精品一区二区久激情瑜伽| 欧美视频精品在线观看| 国产精品午夜在线| 老司机精品视频导航| 欧美网站一区二区| 亚洲欧洲美洲综合色网| 国内精品国产成人国产三级粉色| 欧美性视频一区二区三区| 国产精品女主播av| 国产黄色精品网站| 精品国产第一区二区三区观看体验| 亚洲欧美日韩国产成人精品影院| 国产精品一级在线| 亚洲精品一区二区三区福利| 日本特黄久久久高潮| 欧美日韩国产三级| 免费观看成人鲁鲁鲁鲁鲁视频| 日韩三级.com| 成人网页在线观看| 亚洲黄色av一区| 欧美丰满美乳xxx高潮www| 老司机午夜精品| 中文字幕成人在线观看| 在线免费观看一区| 蜜桃视频第一区免费观看| 久久老女人爱爱| 97精品久久久久中文字幕| 亚洲福利一区二区| 久久久久久影视| 色婷婷综合五月| 日本在线不卡视频| 国产精品福利电影一区二区三区四区| 91视频观看视频| 亚洲第一在线综合网站| 国产寡妇亲子伦一区二区| 国产成人日日夜夜| 亚洲欧美在线高清| 国产精品18久久久久久久久久久久| 99久久99久久免费精品蜜臀| 成人激情黄色小说| 国产欧美一区二区精品性色| 亚洲男人天堂av网| 午夜欧美视频在线观看| 国产高清视频一区| 国产成人精品网址| 日韩 欧美一区二区三区| 欧美久久久久久蜜桃| 首页综合国产亚洲丝袜| 91精品国产aⅴ一区二区| 国产成人亚洲综合a∨婷婷| 久久青草国产手机看片福利盒子 | 成人动漫中文字幕| 欧美美女网站色| 亚洲成av人片在www色猫咪| 成人免费毛片app| 国产日韩影视精品| 国产成+人+日韩+欧美+亚洲| 欧美一卡二卡三卡| 亚洲大片精品永久免费| 欧美性大战xxxxx久久久| 亚洲精品免费看| 欧美日韩一区不卡| 免费高清不卡av| 精品乱码亚洲一区二区不卡| 国产一区美女在线| 国产农村妇女毛片精品久久麻豆 | 精品黑人一区二区三区久久| 亚洲福利视频一区二区| 欧美肥胖老妇做爰| 国产一二精品视频| 亚洲黄一区二区三区| 亚洲乱码国产乱码精品精的特点 | 成人在线综合网| 在线视频综合导航| 秋霞午夜av一区二区三区| 欧美成va人片在线观看| 国产精品伦理在线| 成人性视频免费网站| 99re亚洲国产精品| 欧美国产激情二区三区| 久久久99精品久久| 久久嫩草精品久久久精品一| 2020国产精品久久精品美国| 日韩一区二区视频在线观看| 日韩一区二区三免费高清| 欧美一级久久久久久久大片| 6080午夜不卡| 欧美一区二区三区精品| 日韩精品一区二区三区在线播放 | 国产成人精品综合在线观看 | 成年人午夜久久久| 国产一区二区主播在线| 欧美羞羞免费网站| 久久精品亚洲一区二区三区浴池| 欧美日韩一区不卡| 92国产精品观看| 欧美视频一区二| 97精品国产97久久久久久久久久久久| 三级精品在线观看| 成人av在线网| 在线免费不卡视频| 国内精品久久久久影院薰衣草| 国产精品视频在线看| 中文字幕中文字幕一区| 一区二区三区欧美日韩| 亚洲午夜精品17c| 视频一区欧美精品| 国产乱人伦偷精品视频不卡| 99久久精品国产麻豆演员表| 色婷婷一区二区三区四区| 欧美色视频在线| 久久久影视传媒| 亚洲精品视频免费观看| 免费人成网站在线观看欧美高清| 国产99精品国产| 欧美日韩一级视频| 精品国产乱码久久久久久免费 | 中文字幕在线观看一区| 亚洲中国最大av网站| 精品一区二区在线看| av在线一区二区| 日韩欧美一级二级| 一区二区三区在线观看国产 | 久久九九久精品国产免费直播| 中文字幕一区二区日韩精品绯色| 亚洲bt欧美bt精品| 不卡的电视剧免费网站有什么| 欧美日韩国产欧美日美国产精品| 国产免费观看久久| 麻豆精品精品国产自在97香蕉| www.欧美色图|