在团队内部,您需要制定自己的标准和规则,而文书工作是团队合作的主要规则之一。
好吧,走吧...
链接到
pldoc工具
本身 。
通过参考,所有内容都很好地阐述了如何工作和生成文档,但是为了简化起见,我将提供示例和脚本。
安装(解压缩档案)并在根目录中创建run.bat
rmdir /s /q "%TOMCAT_HOME%/Tomcat 7.0/webapps/plsqldoc" call ..\pldoc.bat -verbose -doctitle 'Api shema' -d '%TOMCAT_HOME%/Tomcat 7.0/webapps/plsqldoc' -url jdbc:oracle:thin:@host:port:SID -user API_DOC -password API_DOC -sql SCAPI.%%%%,API.%%%%,SALE.%%%%,BILLING_API.%%%%,BATCH.%%%%, pause
其中:
- -d'%TOMCAT_HOME%/ Tomcat 7.0 / webapps / plsqldoc'-将在其中生成文档的文件夹;
- -url
jdbc:oracle:thin:@host:port:SID
数据jdbc:oracle:thin:@host:port:SID
数据库服务器; - -sql API。%%%% T %%%%,SALE.A %%%%,BILLING_API。%%%%
API。%%%% T %%%%-获取所有包含字母T的API模式对象;
SALE.A %%%%-采取SALE方案中所有以字母T开头的对象;
BILLING_API。%%%%-取得BILLING_API模式的所有对象;
根据下面描述的设计pl / sql代码的规则,我们开始并获得完成的文档。
设计实例
登记规则 。
登记规则 。
对于包装
create or replace package EXAMPLE is
有关功能和程序
我要求您注意名称功能或过程之后立即开始的对接说明:
create or replace function get_change_rp_current_month
create or replace function get_change_rp_current_month ( in_coid in number ) RETURN number is v_date date; BEGIN v_date := contract.GET_HISTORY_LAST_rateplan_date(co_id => in_coid); if TRUNC(sysdate, 'month')> v_date then return 0; else return 1; end if; end;
如果使用PL / SQL Developer来帮助
一种格式格式化
创建pl_sql_beautifief_rules.br sl。 内容:
Version=1 RightMargin=80 Indent=2 UseTabCharacter=FALSE TabCharacterSize=2 AlignDeclarationGroups=TRUE AlignAssignmentGroups=TRUE KeywordCase=2 IdentifierCase=2 UseSpecialCase=FALSE ItemList.Format=1 ItemList.Align=TRUE ItemList.CommaAfter=TRUE ItemList.AtLeftMargin=FALSE EmptyLines=1 ThenOnNewLine=FALSE LoopOnNewLine=FALSE DML.LeftAlignKeywords=FALSE DML.LeftAlignItems=FALSE DML.OnOneLineIfPossible=FALSE DML.WhereSplitAndOr=TRUE DML.WhereAndOrAfterExpression=FALSE DML.WhereAndOrUnderWhere=TRUE DML.JoinSplitBeforeOn=TRUE DML.InsertItemList.Format=1 DML.InsertItemList.Align=FALSE DML.InsertItemList.CommaAfter=TRUE DML.InsertItemList.AtLeftMargin=FALSE DML.SelectItemList.Format=2 DML.SelectItemList.Align=TRUE DML.SelectItemList.CommaAfter=TRUE DML.SelectItemList.AtLeftMargin=FALSE DML.UpdateItemList.Format=2 DML.UpdateItemList.Align=TRUE DML.UpdateItemList.CommaAfter=TRUE DML.UpdateItemList.AtLeftMargin=FALSE ParameterDeclarationList.Format=1 ParameterDeclarationList.Align=TRUE ParameterDeclarationList.CommaAfter=TRUE ParameterDeclarationList.AtLeftMargin=TRUE RecordFieldList.Format=1 RecordFieldList.Align=TRUE RecordFieldList.CommaAfter=TRUE RecordFieldList.AtLeftMargin=FALSE SplitAndOr=FALSE AndOrAfterExpression=FALSE [SpecialCase]
然后打开PL / SQL Developer->工具-首选项菜单,然后打开PL / SQL beautifief选项卡,然后打开rules文件并指定文件pl_sql_beautifief_rules.br并确认更改。
现在,我们选择编写的pl / sql代码,并通过单击菜单Edit-> PL / SQL beautifief将其格式化为一种样式。
使用模板
“模板”窗口(在“列表”窗口附近),然后单击鼠标左键“新建模板”。