db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaa...@apache.org
Subject svn commit: r779589 - in /db/derby/docs/trunk/src: ref/ tools/
Date Thu, 28 May 2009 13:02:40 GMT
Author: chaase3
Date: Thu May 28 13:02:40 2009
New Revision: 779589

URL: http://svn.apache.org/viewvc?rev=779589&view=rev
Log:
DERBY-3737: Document the new SignatureChecker lint tool in the Tools Guide

Added 2 topics to Tools guide and modified 4 others; added info to Reference Manual topic.

Patch: DERBY-3737.diff

Added:
    db/derby/docs/trunk/src/tools/ctoolssigcheck.dita   (with props)
    db/derby/docs/trunk/src/tools/ctoolsusingsigcheck.dita   (with props)
Modified:
    db/derby/docs/trunk/src/ref/rrefsqljargmatching.dita
    db/derby/docs/trunk/src/tools/ctoolsijtools30948.dita
    db/derby/docs/trunk/src/tools/ctoolsijtools37363.dita
    db/derby/docs/trunk/src/tools/ctoolspre11181.dita
    db/derby/docs/trunk/src/tools/ctoolspre23947.dita
    db/derby/docs/trunk/src/tools/derbytools.ditamap

Modified: db/derby/docs/trunk/src/ref/rrefsqljargmatching.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljargmatching.dita?rev=779589&r1=779588&r2=779589&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljargmatching.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqljargmatching.dita Thu May 28 13:02:40 2009
@@ -88,7 +88,10 @@
 then the last <i>n</i> arguments of the Java method must be of type 
 <i>java.sql.ResultSet[]</i>.</li>
 </ul>
-
+<p><ph conref="../conrefs.dita#prod/productshortname"></ph> provides a
tool,
+<codeph>SignatureChecker</codeph>, which can identify any SQL functions or
+procedures in a database that do not follow these argument matching rules. See
+the <ph conref="../conrefs.dita#pub/citutilities"></ph> for details.</p>
 </section>
 
 <section>

Modified: db/derby/docs/trunk/src/tools/ctoolsijtools30948.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/tools/ctoolsijtools30948.dita?rev=779589&r1=779588&r2=779589&view=diff
==============================================================================
--- db/derby/docs/trunk/src/tools/ctoolsijtools30948.dita (original)
+++ db/derby/docs/trunk/src/tools/ctoolsijtools30948.dita Thu May 28 13:02:40 2009
@@ -29,7 +29,8 @@
 <p>Included with the product are some standalone Java tools and utilities
 that make it easier to use and develop applications for <ph conref="../conrefs.dita#prod/productshortname"></ph>.</p>
 <p>These tools and utilities include:   <ul>
-<li><codeph>ij</codeph>   <p><codeph>ij</codeph> is <ph
conref="../conrefs.dita#prod/productshortname"></ph>'s
+<li><i><ph><indexterm>ij<indexterm>description</indexterm></indexterm></ph>ij</i>
+<p><codeph>ij</codeph> is <ph conref="../conrefs.dita#prod/productshortname"></ph>'s
 interactive JDBC scripting tool. It is a simple utility for running scripts
 against a <ph conref="../conrefs.dita#prod/productshortname"></ph> database.
 You can also use it interactively to run ad hoc queries. <codeph>ij</codeph>
provides
@@ -39,19 +40,22 @@
 allow you to import data directly from files into tables and to export data
 from tables into files. Server-side utilities can be in a client/server environment
 but require that all files referenced be on the Server machine.</p></li>
-<li><i>Database class loading utilities</i>   <p>These utilities
allow you
-to store application logic in a database.</p></li>
+<li><i>The jar file utilities</i>   <p>These utilities allow you
+to store jar files in a database.</p></li>
 <li><i><ph><indexterm>sysinfo<indexterm>description</indexterm></indexterm></ph>sysinfo</i>

  <p><codeph>sysinfo</codeph> provides information about your version of
<ph
 conref="../conrefs.dita#prod/productshortname"></ph> and your environment.</p></li>
 <li><i><ph><indexterm>dblook<indexterm>description</indexterm></indexterm></ph>dblook</i>

  <p><codeph>dblook</codeph> is <ph conref="../conrefs.dita#prod/productshortname"></ph>'s
-Data Definition Language (DDL) Generation Utility, also called a schema dump
-tool. It is a simple utility for the dumping the DDL of a user-specified database
-to either a console or to a file. The generated DDL can then be used for such
+Data Definition Language (DDL) Generation Utility, more informally called a schema dump
+tool. It is a simple utility that dumps the DDL of a user-specified database
+to either a console or a file. The generated DDL can then be used for such
 things as recreating all or parts of a database, viewing a subset of a database's
 objects (for example, those which pertain to specific tables and schemas),
 or documenting a database's schema.</p></li>
-</ul></p>
+<li><i><ph><indexterm>SignatureChecker<indexterm>description</indexterm></indexterm></ph>SignatureChecker</i>
+<p>The <codeph>SignatureChecker</codeph> tool identifies any SQL functions
+and procedures in a database that do not follow the SQL Standard argument
+matching rules.</p></li></ul></p>
 </conbody>
 </concept>

Modified: db/derby/docs/trunk/src/tools/ctoolsijtools37363.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/tools/ctoolsijtools37363.dita?rev=779589&r1=779588&r2=779589&view=diff
==============================================================================
--- db/derby/docs/trunk/src/tools/ctoolsijtools37363.dita (original)
+++ db/derby/docs/trunk/src/tools/ctoolsijtools37363.dita Thu May 28 13:02:40 2009
@@ -21,11 +21,12 @@
 <title>Environment setup and the Derby tools</title>
 <prolog></prolog>
 <conbody>
-<p><codeph>ij</codeph>, <codeph>sysinfo</codeph>, and <codeph>dblook</codeph>
are
+<p><codeph>ij</codeph>, <codeph>sysinfo</codeph>, <codeph>dblook</codeph>,
+and <codeph>SignatureChecker</codeph> are
 tools that can be used in an embedded or a client/server environment. The
-import and export utilities and database class loading utilities are database-side
-utilities, which means that they run in the same JVM as <ph conref="../conrefs.dita#prod/productshortname"></ph>
(e.g.
-on the Server). This means when used in a client/server environment all files
-imported, exported, or loaded must be local to the Server machine.</p>
+import and export utilities and jar file utilities are database-side
+utilities, which means that they run in the same JVM as <ph conref="../conrefs.dita#prod/productshortname"></ph>
(that is,
+on the server). This means when used in a client/server environment all files
+imported, exported, or loaded must be local to the server machine.</p>
 </conbody>
 </concept>

Modified: db/derby/docs/trunk/src/tools/ctoolspre11181.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/tools/ctoolspre11181.dita?rev=779589&r1=779588&r2=779589&view=diff
==============================================================================
--- db/derby/docs/trunk/src/tools/ctoolspre11181.dita (original)
+++ db/derby/docs/trunk/src/tools/ctoolspre11181.dita Thu May 28 13:02:40 2009
@@ -26,8 +26,9 @@
 <ul>
 <li>ij</li>
 <li>the import and export utilities</li>
-<li>the database class loading utilities</li>
+<li>the jar file utilities</li>
 <li>sysinfo</li>
 <li>dblook</li>
+<li>SignatureChecker</li>
 </ul></p>
 </conbody></concept>

Modified: db/derby/docs/trunk/src/tools/ctoolspre23947.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/tools/ctoolspre23947.dita?rev=779589&r1=779588&r2=779589&view=diff
==============================================================================
--- db/derby/docs/trunk/src/tools/ctoolspre23947.dita (original)
+++ db/derby/docs/trunk/src/tools/ctoolspre23947.dita Thu May 28 13:02:40 2009
@@ -26,25 +26,24 @@
 of the tools and utilities, and <ph conref="../conrefs.dita#prod/productshortname"></ph>
and
 JDBC basics for new or infrequent users.</p></li>
 <li><xref href="ctoolsij34525.dita#ctoolsij34525"></xref>   <p>How
to get
-started with ij, a JDBC and SQL scripting tool.</p></li>
+started with <codeph>ij</codeph>, a JDBC and SQL scripting tool.</p></li>
 <li><xref href="rtoolsijpropref29864.dita#rtoolsijpropref29864"></xref>
  <p>Reference
-for ij properties.</p></li>
+for <codeph>ij</codeph> properties.</p></li>
 <li><xref href="rtoolsijcomref25570.dita#rtoolsijcomref25570"></xref> 
 <p>Reference
-for ij commands and errors.</p></li>
+for <codeph>ij</codeph> commands and errors.</p></li>
 <li><xref href="ctoolsimport16245.dita#ctoolsimport16245"></xref>   <p>Reference
 and how-to instructions for using bulk import and export.</p></li>
-<li><xref href="rtoolsijcomref25570.dita#rtoolsijcomref25570"></xref> 
 <p>Syntax
+<li><xref href="ctoolsstorejardb.dita#ctoolsstorejardb"></xref>   <p>Syntax
 for executing the built-in procedures for storing jar files in the database.</p></li>
 <li><xref href="rtoolssysinfo41288.dita#rtoolssysinfo41288"></xref>   <p>Reference
 information on the utility that provides information about your <ph conref="../conrefs.dita#prod/productshortname"></ph>
environment.</p></li>
-<li><xref href="ctoolsdblook.dita#ctoolsdblook"></xref>   <p>dblook
is <ph
-conref="../conrefs.dita#prod/productshortname"></ph>'s Data Definition Language
-(DDL) Generation Utility, which is more informally called a schema dump tool.
-It is a simple utility that dumps the DDL of a user-specified database to
-either a console or to a file. The generated DDL can then be used to recreate
-all or parts of a database, view a subset of a database's objects (for example,
-those which pertain to specific tables or schemas), or document a database's
-schema.</p></li>
+<li><xref href="ctoolsdblook.dita#ctoolsdblook"></xref>   <p>Reference
+information for a utility that dumps the DDL of a user-specified database to
+either a console or a file.</p></li>
+<li><xref href="ctoolssigcheck.dita#ctoolssigcheck"></xref> <p>Reference
+information for a tool that identifies any SQL functions
+and procedures in a database that do not follow the SQL Standard argument
+matching rules.</p></li>
 </ul></p>
 </conbody>
 </concept>

Added: db/derby/docs/trunk/src/tools/ctoolssigcheck.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/tools/ctoolssigcheck.dita?rev=779589&view=auto
==============================================================================
--- db/derby/docs/trunk/src/tools/ctoolssigcheck.dita (added)
+++ db/derby/docs/trunk/src/tools/ctoolssigcheck.dita Thu May 28 13:02:40 2009
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "../dtd/concept.dtd">
+<concept xml:lang="en-us" id="ctoolssigcheck">
+<title>SignatureChecker</title>
+<prolog><metadata>
+<keywords><indexterm>SignatureChecker</indexterm></keywords>
+</metadata>
+</prolog>
+<conbody>
+<p>Use the <codeph>SignatureChecker</codeph> tool to identify any SQL functions
+and procedures in a database that do not follow the SQL argument matching rules
+described in "Argument matching" in the
+<ph conref="../conrefs.dita#pub/citref"></ph>. If your application uses SQL
+functions and/or procedures, you should run this tool against your databases.
+</p>
+</conbody>
+</concept>

Propchange: db/derby/docs/trunk/src/tools/ctoolssigcheck.dita
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/docs/trunk/src/tools/ctoolsusingsigcheck.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/tools/ctoolsusingsigcheck.dita?rev=779589&view=auto
==============================================================================
--- db/derby/docs/trunk/src/tools/ctoolsusingsigcheck.dita (added)
+++ db/derby/docs/trunk/src/tools/ctoolsusingsigcheck.dita Thu May 28 13:02:40 2009
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
+ "../dtd/concept.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<concept id="ctoolsusingsigcheck" xml:lang="en-us">
+<title>Using SignatureChecker</title>
+<prolog><metadata>
+<keywords><indexterm>SignatureChecker<indexterm>using</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<conbody>
+<p>Before you run the <codeph>SignatureChecker</codeph> tool, make sure
that
+your classpath contains the
+<ph conref="../conrefs.dita#prod/productshortname"></ph> jar files, including
+<i>derbytools.jar</i>.</p>
+<p>On a Java SE platform, run the <codeph>SignatureChecker</codeph> tool
as
+follows, where <i>connection-url-to-database</i> is the connection URL you would
+use in order to obtain a connection by calling
+<i>DriverManager.getConnection()</i>:</p>
+<codeblock>
+java org.apache.derby.tools.SignatureChecker <i>connection-url-to-database</i>
+</codeblock>
+<p>Alternatively, you can invoke the tool using <i>derbyrun.jar</i>. For
+example:</p>
+<codeblock>
+java -jar derbyrun.jar SignatureChecker "jdbc:derby:myDB"
+</codeblock>
+<p>On a Java ME platform, run the <codeph>SignatureChecker</codeph> tool
as
+follows, where <i>database-name</i> is the database name you would set by
+calling <i>EmbeddedSimpleDataSource.setDatabaseName()</i>:</p>
+<codeblock>
+java org.apache.derby.tools.SignatureChecker <i>database-name</i>
+</codeblock>
+<p>The tool examines every routine registered in the database and displays
+results like the following:</p>
+<codeblock>Found a matching method for: "APP"."DOINSERT"( )
+Found a matching method for: "APP"."DOINSERTANDCOMMIT"( )
+Found a matching method for: "APP"."APPENDFOOANDBAR"( VARCHAR )
+Unresolvable routine: "APP"."IDONTEXIST"( VARCHAR , INTEGER ).
+Detailed reason: No method was found that matched the method call
+ z.iDontExist(java.lang.String, int),
+tried all combinations of object and primitive types and any possible
+ type conversion for any parameters the method call may have.
+The method might exist but it is not public and/or static, or the
+ parameter types are not method invocation convertible.
+Found a matching method for: "APP"."RUNDDL"( VARCHAR )
+Unresolvable routine: "APP"."TABFUNCDOESNTEXIST"( VARCHAR , BIGINT ).
+Detailed reason: No method was found that matched the method call
+ org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.
+ appendFooAndBar(java.lang.String, long),
+tried all combinations of object and primitive types and any possible
+ type conversion for any parameters the method call may have.
+The method might exist but it is not public and/or static, or the
+ parameter types are not method invocation convertible.
+</codeblock>
+<p>In the example above, the <codeph>SignatureChecker</codeph> tool found
+matches for all routines except for the functions <i>app.iDontExist</i> and
+<i>app.tabFuncDoesntExist</i>. If the tool cannot find a match for one of your
+functions or procedures, it tells you what signature it expected to find. You
+need to adjust your application in one of the following ways:</p>
+<ul>
+<li><b>Method:</b> Change the signature of your Java method to match the
+signature suggested by the <codeph>SignatureChecker</codeph> tool.</li>
+<li><b>Routine:</b> Drop and recreate your function or procedure so that
its
+arguments and return type match your Java method according to the SQL Standard
+rules described in "Argument matching" in the
+<ph conref="../conrefs.dita#pub/citref"></ph>.</li>
+</ul>
+</conbody>
+</concept>

Propchange: db/derby/docs/trunk/src/tools/ctoolsusingsigcheck.dita
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/docs/trunk/src/tools/derbytools.ditamap
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/tools/derbytools.ditamap?rev=779589&r1=779588&r2=779589&view=diff
==============================================================================
--- db/derby/docs/trunk/src/tools/derbytools.ditamap (original)
+++ db/derby/docs/trunk/src/tools/derbytools.ditamap Thu May 28 13:02:40 2009
@@ -344,5 +344,8 @@
 </topicref>
 <topicref href="rtoolsdblookexamples.dita" navtitle="dblook examples"></topicref>
 </topicref>
+<topicref collection-type="family" href="ctoolssigcheck.dita" navtitle="SignatureChecker">
+<topicref href="ctoolsusingsigcheck.dita" navtitle="Using SignatureChecker"></topicref>
+</topicref>
 <topicref href="rtoolstrademderby.dita" navtitle="Trademarks"></topicref>
 </map>



Mime
View raw message