提交 4d3a9d03 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Extract interval data types into subcategory in documentation

上级 e85ffecb
...@@ -3048,7 +3048,26 @@ and ""ResultSet.getObject(..)"" or ""ResultSet.getString(..)"" to retrieve the v ...@@ -3048,7 +3048,26 @@ and ""ResultSet.getObject(..)"" or ""ResultSet.getString(..)"" to retrieve the v
GEOMETRY GEOMETRY
" "
"Data Types","INTERVAL YEAR Type"," "Data Types","INTERVAL Types","
intervalYearType | intervalMonthType | intervalDayType
| intervalHourType| intervalMinuteType | intervalSecondType
| intervalYearToMonthType | intervalDayToHourType
| intervalDayToMinuteType | intervalDayToSecondType
| intervalHourToMinuteType | intervalHourToSecondType
| intervalMinuteToSecondType
","
Interval data types.
There are two classes of intervals. Year-month intervals can store years or months.
Day-time intervals can store days, hours, minutes, and seconds.
Year-month intervals are comparable only with another year-month intervals.
Day-time intervals are comparable only with another day-time intervals.
Mapped to ""org.h2.api.Interval"".
","
INTERVAL DAY TO SECOND
"
"Interval Data Types","INTERVAL YEAR Type","
INTERVAL YEAR [ ( precisionInt ) ] INTERVAL YEAR [ ( precisionInt ) ]
"," ","
Interval data type. Interval data type.
...@@ -3059,7 +3078,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3059,7 +3078,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL YEAR INTERVAL YEAR
" "
"Data Types","INTERVAL MONTH Type"," "Interval Data Types","INTERVAL MONTH Type","
INTERVAL MONTH [ ( precisionInt ) ] INTERVAL MONTH [ ( precisionInt ) ]
"," ","
Interval data type. Interval data type.
...@@ -3070,7 +3089,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3070,7 +3089,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL MONTH INTERVAL MONTH
" "
"Data Types","INTERVAL DAY Type"," "Interval Data Types","INTERVAL DAY Type","
INTERVAL DAY [ ( precisionInt ) ] INTERVAL DAY [ ( precisionInt ) ]
"," ","
Interval data type. Interval data type.
...@@ -3082,7 +3101,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3082,7 +3101,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL DAY INTERVAL DAY
" "
"Data Types","INTERVAL HOUR Type"," "Interval Data Types","INTERVAL HOUR Type","
INTERVAL HOUR [ ( precisionInt ) ] INTERVAL HOUR [ ( precisionInt ) ]
"," ","
Interval data type. Interval data type.
...@@ -3094,7 +3113,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3094,7 +3113,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL HOUR INTERVAL HOUR
" "
"Data Types","INTERVAL MINUTE Type"," "Interval Data Types","INTERVAL MINUTE Type","
INTERVAL MINUTE [ ( precisionInt ) ] INTERVAL MINUTE [ ( precisionInt ) ]
"," ","
Interval data type. Interval data type.
...@@ -3106,7 +3125,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3106,7 +3125,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL MINUTE INTERVAL MINUTE
" "
"Data Types","INTERVAL SECOND Type"," "Interval Data Types","INTERVAL SECOND Type","
INTERVAL SECOND [ ( precisionInt [, fractionalPrecisionInt ] ) ] INTERVAL SECOND [ ( precisionInt [, fractionalPrecisionInt ] ) ]
"," ","
Interval data type. Interval data type.
...@@ -3119,7 +3138,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3119,7 +3138,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL SECOND INTERVAL SECOND
" "
"Data Types","INTERVAL YEAR TO MONTH Type"," "Interval Data Types","INTERVAL YEAR TO MONTH Type","
INTERVAL YEAR [ ( precisionInt ) ] TO MONTH INTERVAL YEAR [ ( precisionInt ) ] TO MONTH
"," ","
Interval data type. Interval data type.
...@@ -3130,7 +3149,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3130,7 +3149,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL YEAR TO MONTH INTERVAL YEAR TO MONTH
" "
"Data Types","INTERVAL DAY TO HOUR Type"," "Interval Data Types","INTERVAL DAY TO HOUR Type","
INTERVAL DAY [ ( precisionInt ) ] TO HOUR INTERVAL DAY [ ( precisionInt ) ] TO HOUR
"," ","
Interval data type. Interval data type.
...@@ -3142,7 +3161,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3142,7 +3161,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL DAY TO HOUR INTERVAL DAY TO HOUR
" "
"Data Types","INTERVAL DAY TO MINUTE Type"," "Interval Data Types","INTERVAL DAY TO MINUTE Type","
INTERVAL DAY [ ( precisionInt ) ] TO MINUTE INTERVAL DAY [ ( precisionInt ) ] TO MINUTE
"," ","
Interval data type. Interval data type.
...@@ -3154,7 +3173,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3154,7 +3173,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL DAY TO MINUTE INTERVAL DAY TO MINUTE
" "
"Data Types","INTERVAL DAY TO SECOND Type"," "Interval Data Types","INTERVAL DAY TO SECOND Type","
INTERVAL DAY [ ( precisionInt ) ] TO SECOND [ ( fractionalPrecisionInt ) ] INTERVAL DAY [ ( precisionInt ) ] TO SECOND [ ( fractionalPrecisionInt ) ]
"," ","
Interval data type. Interval data type.
...@@ -3167,7 +3186,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3167,7 +3186,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL DAY TO SECOND INTERVAL DAY TO SECOND
" "
"Data Types","INTERVAL HOUR TO MINUTE Type"," "Interval Data Types","INTERVAL HOUR TO MINUTE Type","
INTERVAL HOUR [ ( precisionInt ) ] TO MINUTE INTERVAL HOUR [ ( precisionInt ) ] TO MINUTE
"," ","
Interval data type. Interval data type.
...@@ -3179,7 +3198,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3179,7 +3198,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL HOUR TO MINUTE INTERVAL HOUR TO MINUTE
" "
"Data Types","INTERVAL HOUR TO SECOND Type"," "Interval Data Types","INTERVAL HOUR TO SECOND Type","
INTERVAL HOUR [ ( precisionInt ) ] TO SECOND [ ( fractionalPrecisionInt ) ] INTERVAL HOUR [ ( precisionInt ) ] TO SECOND [ ( fractionalPrecisionInt ) ]
"," ","
Interval data type. Interval data type.
...@@ -3192,7 +3211,7 @@ Mapped to ""org.h2.api.Interval"". ...@@ -3192,7 +3211,7 @@ Mapped to ""org.h2.api.Interval"".
INTERVAL HOUR TO SECOND INTERVAL HOUR TO SECOND
" "
"Data Types","INTERVAL MINUTE TO SECOND Type"," "Interval Data Types","INTERVAL MINUTE TO SECOND Type","
INTERVAL * [ ( precisionInt ) ] TO SECOND [ ( fractionalPrecisionInt ) ] INTERVAL * [ ( precisionInt ) ] TO SECOND [ ( fractionalPrecisionInt ) ]
"," ","
Interval data type. Interval data type.
......
...@@ -71,6 +71,28 @@ syntax-end --> ...@@ -71,6 +71,28 @@ syntax-end -->
<p class="notranslate">${item.example}</p> <p class="notranslate">${item.example}</p>
</c:forEach> </c:forEach>
<h2>Interval Data Types</h2>
<c:forEach var="item" items="intervalDataTypes">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
</c:forEach>
<!--[if lte IE 7]><script language="javascript">switchBnf(null);</script><![endif]--> <!--[if lte IE 7]><script language="javascript">switchBnf(null);</script><![endif]-->
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html> <!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......
...@@ -68,9 +68,10 @@ public class BnfSyntax implements BnfVisitor { ...@@ -68,9 +68,10 @@ public class BnfSyntax implements BnfVisitor {
return token; return token;
} }
String page = "grammar.html"; String page = "grammar.html";
if (found.getSection().startsWith("Data Types")) { String section = found.getSection();
if (section.startsWith("Data Types") || section.startsWith("Interval Data Types")) {
page = "datatypes.html"; page = "datatypes.html";
} else if (found.getSection().startsWith("Functions")) { } else if (section.startsWith("Functions")) {
page = "functions.html"; page = "functions.html";
} else if (token.equals("@func@")) { } else if (token.equals("@func@")) {
return "<a href=\"functions.html\">Function</a>"; return "<a href=\"functions.html\">Function</a>";
......
...@@ -92,6 +92,8 @@ public class GenerateDoc { ...@@ -92,6 +92,8 @@ public class GenerateDoc {
help + "= 'Functions (System)' ORDER BY ID", true); help + "= 'Functions (System)' ORDER BY ID", true);
map("dataTypes", map("dataTypes",
help + "LIKE 'Data Types%' ORDER BY SECTION, ID", true); help + "LIKE 'Data Types%' ORDER BY SECTION, ID", true);
map("intervalDataTypes",
help + "LIKE 'Interval Data Types%' ORDER BY SECTION, ID", true);
map("informationSchema", "SELECT TABLE_NAME TOPIC, " + map("informationSchema", "SELECT TABLE_NAME TOPIC, " +
"GROUP_CONCAT(COLUMN_NAME " + "GROUP_CONCAT(COLUMN_NAME " +
"ORDER BY ORDINAL_POSITION SEPARATOR ', ') SYNTAX " + "ORDER BY ORDINAL_POSITION SEPARATOR ', ') SYNTAX " +
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论