Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
2a1545d7
提交
2a1545d7
authored
10月 18, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
HTML railroad diagrams
上级
11095888
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
691 行增加
和
463 行删除
+691
-463
help.csv
h2/src/docsrc/help/help.csv
+249
-277
datatypes.html
h2/src/docsrc/html/datatypes.html
+23
-1
faq.html
h2/src/docsrc/html/faq.html
+1
-1
fragments.html
h2/src/docsrc/html/fragments.html
+13
-2
functions.html
h2/src/docsrc/html/functions.html
+109
-4
grammar.html
h2/src/docsrc/html/grammar.html
+84
-0
stylesheet.css
h2/src/docsrc/html/stylesheet.css
+23
-0
stylesheetPdf.css
h2/src/docsrc/html/stylesheetPdf.css
+22
-0
help.csv
h2/src/main/org/h2/res/help.csv
+147
-164
PageParser.java
h2/src/main/org/h2/server/web/PageParser.java
+2
-2
GenerateDoc.java
h2/src/tools/org/h2/build/doc/GenerateDoc.java
+15
-8
WebSite.java
h2/src/tools/org/h2/build/doc/WebSite.java
+3
-4
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
2a1545d7
差异被折叠。
点击展开。
h2/src/docsrc/html/datatypes.html
浏览文件 @
2a1545d7
...
...
@@ -16,11 +16,33 @@ Data Types
<!-- } -->
<h1>
Data Types
</h1>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="dataTypes">
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
<a href="#${item.link}"
>${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table
class=
"notranslate index"
>
<tr>
<td
class=
"index"
>
<c:forEach
var=
"item"
items=
"dataTypes-0"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"dataTypes-1"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"dataTypes-2"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<c:forEach
var=
"item"
items=
"dataTypes"
>
<h3
id=
"${item.link}"
class=
"notranslate"
>
${item.topic}
</h3>
...
...
h2/src/docsrc/html/faq.html
浏览文件 @
2a1545d7
...
...
@@ -190,7 +190,7 @@ This is not a bug. According the the JDBC specification, the method
<code>
ResultSetMetaData.getColumnName()
</code>
should return the name of the column
and not the alias name. If you need the alias name, use
<a
href=
"http://java.sun.com/javase/6/docs/api/java/sql/ResultSetMetaData.html#getColumnLabel(int)"
><code>
ResultSetMetaData.getColumnLabel()
</code></a>
.
Other database don't work like this (they don't follow the JDBC s
tandard
).
Other database don't work like this (they don't follow the JDBC s
pecification
).
If you need compatibility with those databases, use the
<a
href=
"features.html#compatibility"
>
Compatibility Mode
</a>
,
or set the system property
<a
href=
"../javadoc/org/h2/constant/SysProperties.html#h2.aliasColumnName"
><code>
h2.aliasColumnName
</code></a>
.
</p>
...
...
h2/src/docsrc/html/fragments.html
浏览文件 @
2a1545d7
...
...
@@ -24,7 +24,7 @@ Initial Developer: H2 Group
<td
class=
"search"
colspan=
"2"
>
<!-- translate
<a href="http://translate.google.com/translate?u=http%3A%2F%2Fh2database.com"
onclick="javascript:
document.getElementById('translate').style.display=''
;return false;">Translate</a>
onclick="javascript:
startTranslate()
;return false;">Translate</a>
<div id = "translate" style="display:none"><div id = "google_translate_element"></div></div>
translate -->
</td>
...
...
@@ -94,7 +94,18 @@ translate -->
</div></td></tr></table>
<script
type=
"text/javascript"
src=
"index.js"
></script>
<script
type=
"text/javascript"
src=
"search.js"
></script>
<script
type=
"text/javascript"
>
function
googleTranslateElementInit
()
{
new
google
.
translate
.
TranslateElement
({
pageLanguage
:
'en'
},
'google_translate_element'
);
}
</script>
<script
type=
"text/javascript"
>
function
startTranslate
()
{
document
.
getElementById
(
'translate'
).
style
.
display
=
''
;
var
script
=
document
.
createElement
(
'script'
);
script
.
setAttribute
(
"type"
,
"text/javascript"
);
script
.
setAttribute
(
"src"
,
"http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"
);
document
.
getElementsByTagName
(
"head"
)[
0
].
appendChild
(
script
);
}
function
googleTranslateElementInit
()
{
new
google
.
translate
.
TranslateElement
({
pageLanguage
:
'en'
},
'google_translate_element'
);
}
</script>
<!-- } -->
...
...
h2/src/docsrc/html/functions.html
浏览文件 @
2a1545d7
...
...
@@ -18,39 +18,144 @@ Functions
<h1>
Functions
</h1>
<h2>
Aggregate Functions
</h2>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="functionsAggregate">
<a href="#${item.link}" >${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table
class=
"notranslate index"
>
<tr>
<td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsAggregate-0"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsAggregate-1"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsAggregate-2"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<h2>
Numeric Functions
</h2>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="functionsNumeric">
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
<a href="#${item.link}"
>${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table
class=
"notranslate index"
>
<tr>
<td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsNumeric-0"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsNumeric-1"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsNumeric-2"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<h2>
String Functions
</h2>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="functionsString">
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
<a href="#${item.link}"
>${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table
class=
"notranslate index"
>
<tr>
<td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsString-0"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsString-1"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsString-2"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<h2>
Time and Date Functions
</h2>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="functionsTimeDate">
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
<a href="#${item.link}"
>${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table
class=
"notranslate index"
>
<tr>
<td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsTimeDate-0"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsTimeDate-1"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsTimeDate-2"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<h2>
System Functions
</h2>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="functionsSystem">
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
<a href="#${item.link}"
>${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table
class=
"notranslate index"
>
<tr>
<td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsSystem-0"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsSystem-1"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"functionsSystem-2"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<c:forEach
var=
"item"
items=
"functionsAll"
>
<h3
id=
"${item.link}"
class=
"notranslate"
>
${item.topic}
</h3>
...
...
h2/src/docsrc/html/grammar.html
浏览文件 @
2a1545d7
...
...
@@ -17,32 +17,116 @@ SQL Grammar
<h1>
SQL Grammar
</h1>
<h2>
Commands (Data Manipulation)
</h2>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="commandsDML">
<a href="#${item.link}">${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table
class=
"notranslate index"
>
<tr>
<td
class=
"index"
>
<c:forEach
var=
"item"
items=
"commandsDML-0"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"commandsDML-1"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"commandsDML-2"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<h2>
Commands (Data Definition)
</h2>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="commandsDDL">
<a href="#${item.link}">${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table
class=
"notranslate index"
>
<tr>
<td
class=
"index"
>
<c:forEach
var=
"item"
items=
"commandsDDL-0"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"commandsDDL-1"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"commandsDDL-2"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<h2>
Commands (Other)
</h2>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="commandsOther">
<a href="#${item.link}">${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table
class=
"notranslate index"
>
<tr>
<td
class=
"index"
>
<c:forEach
var=
"item"
items=
"commandsOther-0"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"commandsOther-1"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"commandsOther-2"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<h2>
Other Grammar
</h2>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="otherGrammar">
<a href="#${item.link}" >${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table
class=
"notranslate index"
>
<tr>
<td
class=
"index"
>
<c:forEach
var=
"item"
items=
"otherGrammar-0"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"otherGrammar-1"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td><td
class=
"index"
>
<c:forEach
var=
"item"
items=
"otherGrammar-2"
>
<a
href=
"#${item.link}"
>
${item.topic}
</a><br
/>
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<h2>
System Tables
</h2>
<p
class=
"notranslate"
>
...
...
h2/src/docsrc/html/stylesheet.css
浏览文件 @
2a1545d7
...
...
@@ -214,6 +214,29 @@ td.content {
color
:
#800
;
}
table
.index
{
width
:
100%
;
border
:
0px
;
padding
:
0px
;
margin
:
0px
;
border
:
0px
none
;
border-collapse
:
collapse
;
}
/* width: 570px;
width: 190px;
*/
td
.index
{
width
:
33%
;
border
:
0px
;
padding
:
0px
;
margin
:
0px
;
border
:
0px
none
;
border-collapse
:
collapse
;
vertical-align
:
top
;
}
.railroad
{
border
:
0px
;
padding
:
0px
;
...
...
h2/src/docsrc/html/stylesheetPdf.css
浏览文件 @
2a1545d7
...
...
@@ -131,3 +131,25 @@ em.u {
color
:
#800
;
}
table
.index
{
width
:
100%
;
border
:
0px
;
padding
:
0px
;
margin
:
0px
;
border
:
0px
none
;
border-collapse
:
collapse
;
}
/* width: 570px;
width: 190px;
*/
td
.index
{
width
:
33%
;
border
:
0px
;
padding
:
0px
;
margin
:
0px
;
border
:
0px
none
;
border-collapse
:
collapse
;
vertical-align
:
top
;
}
h2/src/main/org/h2/res/help.csv
浏览文件 @
2a1545d7
差异被折叠。
点击展开。
h2/src/main/org/h2/server/web/PageParser.java
浏览文件 @
2a1545d7
...
...
@@ -7,8 +7,8 @@
package
org
.
h2
.
server
.
web
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.h2.util.New
;
...
...
@@ -92,7 +92,7 @@ public class PageParser {
String
items
=
readParam
(
"items"
);
read
(
">"
);
int
start
=
pos
;
ArrayList
<
Object
>
list
=
(
Array
List
<
Object
>)
get
(
items
);
List
<
Object
>
list
=
(
List
<
Object
>)
get
(
items
);
if
(
list
==
null
)
{
result
.
append
(
"?items?"
);
list
=
New
.
arrayList
();
...
...
h2/src/tools/org/h2/build/doc/GenerateDoc.java
浏览文件 @
2a1545d7
...
...
@@ -16,6 +16,7 @@ import java.sql.ResultSetMetaData;
import
java.sql.Statement
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
org.h2.bnf.Bnf
;
import
org.h2.engine.Constants
;
...
...
@@ -69,15 +70,15 @@ public class GenerateDoc {
// String help = "SELECT * FROM INFORMATION_SCHEMA.HELP WHERE SECTION";
String
help
=
"SELECT ROWNUM ID, * FROM CSVREAD('"
+
inHelp
+
"') WHERE SECTION "
;
map
(
"commands"
,
help
+
"LIKE 'Commands%' ORDER BY ID"
,
true
);
map
(
"commandsDML"
,
help
+
"= 'Commands (DML)' ORDER BY ID"
,
tru
e
);
map
(
"commandsDDL"
,
help
+
"= 'Commands (DDL)' ORDER BY ID"
,
tru
e
);
map
(
"commandsOther"
,
help
+
"= 'Commands (Other)' ORDER BY ID"
,
tru
e
);
map
(
"commandsDML"
,
help
+
"= 'Commands (DML)' ORDER BY ID"
,
fals
e
);
map
(
"commandsDDL"
,
help
+
"= 'Commands (DDL)' ORDER BY ID"
,
fals
e
);
map
(
"commandsOther"
,
help
+
"= 'Commands (Other)' ORDER BY ID"
,
fals
e
);
map
(
"otherGrammar"
,
help
+
"= 'Other Grammar' ORDER BY ID"
,
true
);
map
(
"functionsAggregate"
,
help
+
"= 'Functions (Aggregate)' ORDER BY ID"
,
tru
e
);
map
(
"functionsNumeric"
,
help
+
"= 'Functions (Numeric)' ORDER BY ID"
,
tru
e
);
map
(
"functionsString"
,
help
+
"= 'Functions (String)' ORDER BY ID"
,
tru
e
);
map
(
"functionsTimeDate"
,
help
+
"= 'Functions (Time and Date)' ORDER BY ID"
,
tru
e
);
map
(
"functionsSystem"
,
help
+
"= 'Functions (System)' ORDER BY ID"
,
tru
e
);
map
(
"functionsAggregate"
,
help
+
"= 'Functions (Aggregate)' ORDER BY ID"
,
fals
e
);
map
(
"functionsNumeric"
,
help
+
"= 'Functions (Numeric)' ORDER BY ID"
,
fals
e
);
map
(
"functionsString"
,
help
+
"= 'Functions (String)' ORDER BY ID"
,
fals
e
);
map
(
"functionsTimeDate"
,
help
+
"= 'Functions (Time and Date)' ORDER BY ID"
,
fals
e
);
map
(
"functionsSystem"
,
help
+
"= 'Functions (System)' ORDER BY ID"
,
fals
e
);
map
(
"functionsAll"
,
help
+
"LIKE 'Functions%' ORDER BY SECTION, ID"
,
true
);
map
(
"dataTypes"
,
help
+
"LIKE 'Data Types%' ORDER BY SECTION, ID"
,
true
);
map
(
"informationSchema"
,
"SELECT TABLE_NAME TOPIC, GROUP_CONCAT(COLUMN_NAME "
...
...
@@ -160,6 +161,12 @@ public class GenerateDoc {
list
.
add
(
map
);
}
session
.
put
(
key
,
list
);
int
div
=
3
;
int
part
=
(
list
.
size
()
+
div
-
1
)
/
div
;
for
(
int
i
=
0
,
start
=
0
;
i
<
div
;
i
++,
start
+=
part
)
{
List
<
HashMap
<
String
,
String
>>
listThird
=
list
.
subList
(
start
,
Math
.
min
(
start
+
part
,
list
.
size
()));
session
.
put
(
key
+
"-"
+
i
,
listThird
);
}
}
finally
{
JdbcUtils
.
closeSilently
(
rs
);
JdbcUtils
.
closeSilently
(
stat
);
...
...
h2/src/tools/org/h2/build/doc/WebSite.java
浏览文件 @
2a1545d7
...
...
@@ -25,10 +25,9 @@ import org.h2.util.StringUtils;
public
class
WebSite
{
private
static
final
String
ANALYTICS_TAG
=
"<!-- analytics -->"
;
private
static
final
String
ANALYTICS_
AND_TRANSLATE_
SCRIPT
=
private
static
final
String
ANALYTICS_SCRIPT
=
"<script src=\"http://www.google-analytics.com/ga.js\" type=\"text/javascript\"></script>\n"
+
"<script type=\"text/javascript\">var pageTracker=_gat._getTracker(\"UA-2351060-1\");pageTracker._initData();pageTracker._trackPageview();</script>\n"
+
"<script type=\"text/javascript\" src=\"http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit\"></script>"
;
"<script type=\"text/javascript\">var pageTracker=_gat._getTracker(\"UA-2351060-1\");pageTracker._initData();pageTracker._trackPageview();</script>"
;
private
static
final
String
TRANSLATE_START
=
"<!-- translate"
;
private
static
final
String
TRANSLATE_END
=
"translate -->"
;
...
...
@@ -139,7 +138,7 @@ public class WebSite {
if
(
name
.
endsWith
(
".html"
))
{
String
page
=
new
String
(
bytes
,
"UTF-8"
);
if
(
web
)
{
page
=
StringUtils
.
replaceAll
(
page
,
ANALYTICS_TAG
,
ANALYTICS_
AND_TRANSLATE_
SCRIPT
);
page
=
StringUtils
.
replaceAll
(
page
,
ANALYTICS_TAG
,
ANALYTICS_SCRIPT
);
}
if
(
replaceFragments
)
{
page
=
replaceFragments
(
name
,
page
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论