db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r507301 - in /db/derby/docs/trunk/src/ref: rrefdayfunc.dita rrefhourfunc.dita rrefminutefunc.dita rrefmonthfunc.dita rrefsecondfunc.dita rrefyearfunc.dita
Date Tue, 13 Feb 2007 23:27:02 GMT
Author: bpendleton
Date: Tue Feb 13 15:27:00 2007
New Revision: 507301

URL: http://svn.apache.org/viewvc?view=rev&rev=507301
Log:
DERBY-908: Function documentation has incorrect information on durations

All these functions in the reference manual have a sentence like:
(this is from DAY)

If the argument is a time duration or timestamp duration: The result is
the day part of the value, which is an integer between -99 and 99. A
nonzero result has the same sign as the argument.

This change removes this text since Derby does not support durations. The
change also reworks the surrounding text and some of the examples to be
clearer, since these functions only have a single type of argument.

Modified:
    db/derby/docs/trunk/src/ref/rrefdayfunc.dita
    db/derby/docs/trunk/src/ref/rrefhourfunc.dita
    db/derby/docs/trunk/src/ref/rrefminutefunc.dita
    db/derby/docs/trunk/src/ref/rrefmonthfunc.dita
    db/derby/docs/trunk/src/ref/rrefsecondfunc.dita
    db/derby/docs/trunk/src/ref/rrefyearfunc.dita

Modified: db/derby/docs/trunk/src/ref/rrefdayfunc.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefdayfunc.dita?view=diff&rev=507301&r1=507300&r2=507301
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefdayfunc.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefdayfunc.dita Tue Feb 13 15:27:00 2007
@@ -27,19 +27,14 @@
 <refbody>
 <section> <p>The argument must be a date, timestamp, or a valid character
 string representation of a date or timestamp that is not a CLOB, LONG VARCHAR,
-or XML value.  The result of the function is a large integer. If the argument
+or XML value.  The result of the function is an integer between 1 and 31.
+If the argument
 can be null, the result can be null; if the argument is null, the result is
-the null value.</p> <p>The other rules depend on the data type of the argument
-specified:  <ul>
-<li>If the argument is a date, timestamp, or valid string representation of
-a date or timestamp:  The result is the day part of the value, which is an
-integer between 1 and 31. </li>
-<li>If the argument is a time duration or timestamp duration: The result is
-the day part of the value, which is an integer between -99 and 99. A nonzero
-result has the same sign as the argument.</li>
-</ul></p></section>
+the null value.
+</p></section>
 <refsyn><title>Syntax</title> <codeblock><b>DAY ( <i>expression</i>
)</b></codeblock> </refsyn>
-<example> <codeblock><b>values day('2006-08-02');</b></codeblock>
<p>The resulting
+<example>  <title>Example</title>
+<codeblock><b>values day('2006-08-02');</b></codeblock> <p>The
resulting
 value is 2.</p> </example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefhourfunc.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefhourfunc.dita?view=diff&rev=507301&r1=507300&r2=507301
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefhourfunc.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefhourfunc.dita Tue Feb 13 15:27:00 2007
@@ -27,20 +27,15 @@
 <refbody>
 <section> <p>The argument must be a time, timestamp, or a valid character
 string representation of a time or timestamp that is not a CLOB, LONG VARCHAR,
-or XML value.  The result of the function is a large integer. If the argument
+or XML value.  The result of the function is an integer between 0 and 24.
+If the argument
 can be null, the result can be null; if the argument is null, the result is
-the null value.</p> <p>The other rules depend on the data type of the argument
-specified:  <ul>
-<li>If the argument is a date, timestamp, or valid string representation of
-a date or timestamp:  The result is the hour part of the value, which is an
-integer between 0 and 24. </li>
-<li>If the argument is a time duration or timestamp duration: The result is
-the hour part of the value, which is an integer between -99 and 99. A nonzero
-result has the same sign as the argument.</li>
-</ul></p></section>
+the null value.
+</p></section>
 <refsyn><title>Syntax</title> <codeblock><b>HOUR ( <i>expression</i>
)</b></codeblock> </refsyn>
-<example> <p>Select all the classes that start in the afternoon from a table
-called TABLE1.</p> <codeblock><b>SELECT * FROM TABLE1
-WHERE HOUR(STARTING) BETWEEN 12 AND 17</b></codeblock> </example>
+<example>  <title>Example</title>
+<p>Select all the classes that start in the afternoon from a table
+called TABLE1.</p>
+<codeblock><b>SELECT * FROM TABLE1 WHERE HOUR(STARTING) BETWEEN 12 AND 17</b></codeblock>
</example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefminutefunc.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefminutefunc.dita?view=diff&rev=507301&r1=507300&r2=507301
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefminutefunc.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefminutefunc.dita Tue Feb 13 15:27:00 2007
@@ -27,19 +27,14 @@
 <refbody>
 <section> <p> The argument must be a time, timestamp, or a valid character
 string representation of a time or timestamp that is not a CLOB, LONG VARCHAR,
-or XML value.  The result of the function is a large integer. If the argument
+or XML value.  The result of the function is an integer between 0 and 59.
+If the argument
 can be null, the result can be null; if the argument is null, the result is
-the null value.</p> <p>The other rules depend on the data type of the argument
-specified:  <ul>
-<li>If the argument is a date, timestamp, or valid string representation of
-a date or timestamp:  The result is the minute part of the value, which is
-an integer between 0 and 59.</li>
-<li>If the argument is a time duration or timestamp duration: The result is
-the minute part of the value, which is an integer between -99 and 99. A nonzero
-result has the same sign as the argument.</li>
-</ul></p></section>
+the null value.
+</p></section>
 <refsyn><title>Syntax</title> <codeblock><b>MINUTE ( <i>expression</i>
)</b></codeblock> </refsyn>
-<example> <p></p> <codeblock><b>-- Select all classes that
do not end on a full hour:
-SELECT * FROM table1 WHERE MINUTE(ending) &lt; 60;</b></codeblock> </example>
+<example>  <title>Example</title>
+<p>Select all classes that do not end on a full hour: </p>
+<codeblock><b>SELECT * FROM table1 WHERE MINUTE(ending) &lt; 60;</b></codeblock>
</example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefmonthfunc.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefmonthfunc.dita?view=diff&rev=507301&r1=507300&r2=507301
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefmonthfunc.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefmonthfunc.dita Tue Feb 13 15:27:00 2007
@@ -27,20 +27,15 @@
 <refbody>
 <section> <p>The argument must be a date, timestamp, or a valid character
 string representation of a date or timestamp that is not a CLOB, LONG VARCHAR,
-or XML value.  The result of the function is a large integer. If the argument
+or XML value.  The result of the function is an integer between 1 and 12.
+If the argument
 can be null, the result can be null; if the argument is null, the result is
-the null value. </p> <p>The other rules depend on the data type of the argument
-specified:  <ul>
-<li>If the argument is a date, timestamp, or valid string representation of
-a date or timestamp:  The result is the month part of the value, which is
-an integer between 1 and 12.</li>
-<li>If the argument is a date duration or timestamp duration:  The result
-is the month part of the value, which is an integer between -99 and 99. A
-nonzero result has the same sign as the argument.</li>
-</ul></p></section>
+the null value.
+</p></section>
 <refsyn><title>Syntax</title> <codeblock><b>MONTH ( <i>expression</i>
)</b></codeblock> </refsyn>
-<example> <p>Select all rows from the EMPLOYEE table for people who were born
-(BIRTHDATE) in DECEMBER.</p> <codeblock><b>SELECT * FROM EMPLOYEE
-WHERE MONTH(BIRTHDATE) = 12</b></codeblock> </example>
+<example>  <title>Example</title>
+<p>Select all rows from the EMPLOYEE table for people who were born
+(BIRTHDATE) in DECEMBER.</p>
+<codeblock><b>SELECT * FROM EMPLOYEE WHERE MONTH(BIRTHDATE) = 12</b></codeblock>
</example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefsecondfunc.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsecondfunc.dita?view=diff&rev=507301&r1=507300&r2=507301
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsecondfunc.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsecondfunc.dita Tue Feb 13 15:27:00 2007
@@ -28,21 +28,17 @@
 <refbody>
 <section> <p>The argument must be a time, timestamp, or a valid character
 string representation of a time or timestamp that is not a CLOB, LONG VARCHAR,
-or XML value.  The result of the function is a large integer. If the argument
+or XML value.  The result of the function is an integer between 0 and 59.
+If the argument
 can be null, the result can be null. If the argument is null, the result is
-0.</p> <p>The other rules depend on the data type of the argument specified:
- <ul>
-<li>If the argument is a date, timestamp, or valid string representation of
-a date or timestamp:  The result is the seconds part of the value, which is
-an integer between 0 and 59.</li>
-<li>If the argument is a time duration or timestamp duration: The result is
-the seconds part of the value, which is an integer between -99 and 99. A nonzero
-result has the same sign as the argument.</li>
-</ul></p></section>
+0.
+</p></section>
 <refsyn><title>Syntax</title><codeblock>SECOND ( <i>expression</i>
)</codeblock> </refsyn>
-<example> <title>Example</title><p>The column RECEIVED (timestamp)
has an
-internal value equivalent to 2005-12-25-17.12.30.000000. To determine return
-only the seconds part of the timestamp, use the following syntax:<codeblock>SECOND(RECEIVED)</codeblock>The
+<example> <title>Example</title><p>
+The RECEIVED column contains a timestamp that has an internal value
+equivalent to 2005-12-25-17.12.30.000000.
+To return only the seconds part of the timestamp, use the following syntax:
+<codeblock><b>SECOND(RECEIVED)</b></codeblock>The
 value 30 is returned.</p></example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefyearfunc.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefyearfunc.dita?view=diff&rev=507301&r1=507300&r2=507301
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefyearfunc.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefyearfunc.dita Tue Feb 13 15:27:00 2007
@@ -26,21 +26,16 @@
 <refbody>
 <section> <p>The YEAR function returns the year part of a value. The argument
 must be a date, timestamp, or a valid character string representation of a
-date or timestamp. The result of the function is a large integer. If the argument
+date or timestamp. The result of the function is an integer between 1 and 9 999.
+If the argument
 can be null, the result can be null; if the argument is null, the result is
-the null value.</p> <p>The other rules depend on the data type of the argument
-specified:  <ul>
-<li>If the argument is a date, timestamp, or valid string representation of
-a date or timestamp:  The result is the year part of the value, which is an
-integer between 1 and 9 999.</li>
-<li>If the argument is a date duration or timestamp duration:  The result
-is the year part of the value, which is an integer between -9 999 and 9 999.
-A nonzero result has the same sign as the argument.</li>
-</ul></p></section>
+the null value.
+</p></section>
 <refsyn><title>Syntax</title> <codeblock><b>YEAR ( <i>expression</i>
)</b></codeblock> </refsyn>
-<example> <p>Select all the projects in the PROJECT table  that are scheduled
-to start (PRSTDATE) and end (PRENDATE)  in the same calendar year.</p> <codeblock><b>SELECT
* FROM PROJECT
-WHERE YEAR(PRSTDATE) = YEAR(PRENDATE)</b></codeblock> </example>
+<example>  <title>Example</title>
+<p>Select all the projects in the PROJECT table  that are scheduled
+to start (PRSTDATE) and end (PRENDATE)  in the same calendar year.</p>
+<codeblock><b>SELECT * FROM PROJECT WHERE YEAR(PRSTDATE) = YEAR(PRENDATE)</b></codeblock>
</example>
 </refbody>
 </reference>
 



Mime
View raw message