Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
574eec00
提交
574eec00
authored
3月 14, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
ffb87e00
全部展开
显示空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
2590 行增加
和
2044 行删除
+2590
-2044
ant-build.properties
h2/ant-build.properties
+2
-2
build.xml
h2/build.xml
+1
-0
build.html
h2/src/docsrc/html/build.html
+1
-1
changelog.html
h2/src/docsrc/html/changelog.html
+10
-2
download.html
h2/src/docsrc/html/download.html
+6
-6
links.html
h2/src/docsrc/html/links.html
+9
-0
mainWeb.html
h2/src/docsrc/html/mainWeb.html
+5
-5
search.html
h2/src/docsrc/html/search.html
+1
-0
classes.html
h2/src/docsrc/javadoc/classes.html
+9
-3
index.html
h2/src/docsrc/javadoc/index.html
+1
-1
_docs_en.utf8.txt
h2/src/docsrc/text/_docs_en.utf8.txt
+665
-635
_docs_ja.utf8.txt
h2/src/docsrc/text/_docs_ja.utf8.txt
+1064
-635
_docs_en.properties
h2/src/docsrc/textbase/_docs_en.properties
+647
-637
Driver.java
h2/src/main/org/h2/Driver.java
+5
-1
SysProperties.java
h2/src/main/org/h2/constant/SysProperties.java
+1
-3
Constants.java
h2/src/main/org/h2/engine/Constants.java
+4
-4
JdbcDataSource.java
h2/src/main/org/h2/jdbcx/JdbcDataSource.java
+30
-2
JdbcDataSourceFactory.java
h2/src/main/org/h2/jdbcx/JdbcDataSourceFactory.java
+2
-1
ResultTempTable.java
h2/src/main/org/h2/result/ResultTempTable.java
+1
-1
RowList.java
h2/src/main/org/h2/result/RowList.java
+10
-1
Newsfeed.java
h2/src/test/org/h2/samples/Newsfeed.java
+9
-9
newsfeed.sql
h2/src/test/org/h2/samples/newsfeed.sql
+44
-38
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+20
-24
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+2
-1
TestDataSource.java
h2/src/test/org/h2/test/jdbcx/TestDataSource.java
+24
-24
CheckTextFiles.java
h2/src/tools/org/h2/tools/code/CheckTextFiles.java
+1
-1
MergeDocs.java
h2/src/tools/org/h2/tools/doc/MergeDocs.java
+9
-4
SpellChecker.java
h2/src/tools/org/h2/tools/doc/SpellChecker.java
+1
-1
WebSite.java
h2/src/tools/org/h2/tools/doc/WebSite.java
+4
-1
dictionary.txt
h2/src/tools/org/h2/tools/doc/dictionary.txt
+2
-1
没有找到文件。
h2/ant-build.properties
浏览文件 @
574eec00
#Fri
Feb 22 08:12:33
CET 2008
#Fri
Mar 14 15:37:20
CET 2008
benchmark.drivers.dir
=
C
\:
/data/java
benchmark.drivers.dir
=
C
\:
/data/java
javac
=
javac
javac
=
javac
jdk
=
1.4
jdk
=
1.4
path.lucene.jar
=
C
\:
/data/classpath/lucene-core-2.2.0.jar
path.lucene.jar
=
C
\:
/data/classpath/lucene-core-2.2.0.jar
path.servlet.jar
=
C
\:
/data/classpath/servlet-api.jar
path.servlet.jar
=
C
\:
/data/classpath/servlet-api.jar
version.name.maven
=
1.0.6
7
version.name.maven
=
1.0.6
8
h2/build.xml
浏览文件 @
574eec00
...
@@ -144,6 +144,7 @@
...
@@ -144,6 +144,7 @@
<fileset
dir=
"src/main"
includes=
"**/*.sql"
/>
<fileset
dir=
"src/main"
includes=
"**/*.sql"
/>
<fileset
dir=
"src/installer"
includes=
"*.bat"
/>
<fileset
dir=
"src/installer"
includes=
"*.bat"
/>
<fileset
dir=
"src/test"
includes=
"**/*.txt"
/>
<fileset
dir=
"src/test"
includes=
"**/*.txt"
/>
<fileset
dir=
"src/test"
includes=
"**/*.sql"
/>
<fileset
dir=
"src/test"
includes=
"**/*.properties"
/>
<fileset
dir=
"src/test"
includes=
"**/*.properties"
/>
</copy>
</copy>
</target>
</target>
...
...
h2/src/docsrc/html/build.html
浏览文件 @
574eec00
...
@@ -78,7 +78,7 @@ Example:
...
@@ -78,7 +78,7 @@ Example:
<
dependency
>
<
dependency
>
<
groupId
>
com.h2database
<
/groupId
>
<
groupId
>
com.h2database
<
/groupId
>
<
artifactId
>
h2
<
/artifactId
>
<
artifactId
>
h2
<
/artifactId
>
<
version
>
1.0.6
7
<
/version
>
<
version
>
1.0.6
8
<
/version
>
<
/dependency
>
<
/dependency
>
</pre>
</pre>
<p>
<p>
...
...
h2/src/docsrc/html/changelog.html
浏览文件 @
574eec00
...
@@ -15,7 +15,15 @@ Change Log
...
@@ -15,7 +15,15 @@ Change Log
<h2>
Next Version (unreleased)
</h2>
<h2>
Next Version (unreleased)
</h2>
<ul>
<ul>
<li>
ALTER SEQUENCE and ALTER TABLE ALTER COLUMN RESTART can now be used inside a transaction.
<li>
Very large SELECT DISTINCT and UNION EXCEPT queries are now supported,
however this feature is disabled by default. To enable it, set
the system property h2.maxMemoryRowsDistinct to a lower value, for example 10000.
</li><li>
A error is now thrown when trying to call a method
inside a trigger that implicitly commits the current transaction,
if an object is locked.
</li><li>
Unused LOB files were deleted much too late.
Now they are deleted if no longer referenced in memory.
</li><li>
ALTER SEQUENCE and ALTER TABLE ALTER COLUMN RESTART can now be used inside a transaction.
</li><li>
New system property h2.aliasColumnName. When enabled, aliased columns
</li><li>
New system property h2.aliasColumnName. When enabled, aliased columns
(as in SELECT ID AS I FROM TEST) return the real table and column name in
(as in SELECT ID AS I FROM TEST) return the real table and column name in
ResultSetMetaData.getTableName() and getColumnName(). This is disabled by
ResultSetMetaData.getTableName() and getColumnName(). This is disabled by
...
@@ -43,7 +51,7 @@ Change Log
...
@@ -43,7 +51,7 @@ Change Log
way (SecureRandom.generateSeed) was very slow. Now using a daemon thread
way (SecureRandom.generateSeed) was very slow. Now using a daemon thread
to avoid this problem.
to avoid this problem.
</li><li>
SELECT UNION with a different number of ORDER BY columns did throw an ArrayIndexOutOfBoundsException.
</li><li>
SELECT UNION with a different number of ORDER BY columns did throw an ArrayIndexOutOfBoundsException.
</li><li>
When using
view, the precision of colum
n was changed to the default scale for some data types.
</li><li>
When using
a view, the column precisio
n was changed to the default scale for some data types.
</li><li>
CSVWRITE now supports a 'null string' that is used for parsing and writing NULL.
</li><li>
CSVWRITE now supports a 'null string' that is used for parsing and writing NULL.
</li><li>
Some long running queries could not be cancelled.
</li><li>
Some long running queries could not be cancelled.
</li><li>
Queries with many outer join tables were very slow. Fixed.
</li><li>
Queries with many outer join tables were very slow. Fixed.
...
...
h2/src/docsrc/html/download.html
浏览文件 @
574eec00
...
@@ -15,16 +15,16 @@ H2 Database Engine
...
@@ -15,16 +15,16 @@ H2 Database Engine
<h1>
Downloads
</h1>
<h1>
Downloads
</h1>
<h3>
Version 1.0.67 (2008-0
2-22
, Current)
</h3>
<h3>
Version 1.0.67 (2008-0
3-14
, Current)
</h3>
<p>
<p>
<a
href=
"http://www.h2database.com/h2-setup-2008-0
2-22
.exe"
>
Windows Installer
</a><br
/>
<a
href=
"http://www.h2database.com/h2-setup-2008-0
3-14
.exe"
>
Windows Installer
</a><br
/>
<a
href=
"http://www.h2database.com/h2-2008-0
2-22
.zip"
>
Platform-Independent Zip
</a><br
/>
<a
href=
"http://www.h2database.com/h2-2008-0
3-14
.zip"
>
Platform-Independent Zip
</a><br
/>
</p>
</p>
<h3>
Version 1.0.66 (2008-02-
0
2, Last Stable)
</h3>
<h3>
Version 1.0.66 (2008-02-
2
2, Last Stable)
</h3>
<p>
<p>
<a
href=
"http://www.h2database.com/h2-setup-2008-02-
0
2.exe"
>
Windows Installer
</a><br
/>
<a
href=
"http://www.h2database.com/h2-setup-2008-02-
2
2.exe"
>
Windows Installer
</a><br
/>
<a
href=
"http://www.h2database.com/h2-2008-02-
0
2.zip"
>
Platform-Independent Zip
</a><br
/>
<a
href=
"http://www.h2database.com/h2-2008-02-
2
2.zip"
>
Platform-Independent Zip
</a><br
/>
</p>
</p>
<h3>
Download Mirror and Older Versions
</h3>
<h3>
Download Mirror and Older Versions
</h3>
...
...
h2/src/docsrc/html/links.html
浏览文件 @
574eec00
...
@@ -12,6 +12,10 @@ H2 In Use and Links
...
@@ -12,6 +12,10 @@ H2 In Use and Links
<table
class=
"content"
><tr
class=
"content"
><td
class=
"content"
><div
class=
"contentDiv"
>
<table
class=
"content"
><tr
class=
"content"
><td
class=
"content"
><div
class=
"contentDiv"
>
<h1>
H2 In Use and Links
</h1>
<h1>
H2 In Use and Links
</h1>
<p>
Those are just a few links to products using or supporting H2.
If you want to add a link, please send it to the support email address or post it in the group.
</p>
<h2>
Books
</h2>
<h2>
Books
</h2>
<a
href=
"http://code.google.com/p/seaminaction/wiki/GettingStarted"
>
<a
href=
"http://code.google.com/p/seaminaction/wiki/GettingStarted"
>
...
@@ -176,6 +180,11 @@ A tool to manage database changes and refactorings.
...
@@ -176,6 +180,11 @@ A tool to manage database changes and refactorings.
Luntbuild
</a><br
/>
Luntbuild
</a><br
/>
Build automation and management tool.
</p>
Build automation and management tool.
</p>
<p><a
href=
"http://www.source-code.biz/snippets/java/8.htm"
>
MiniConnectionPoolManager
</a><br
/>
A lightweight standalone JDBC connection pool manager.
</p>
<p><a
href=
"http://jenkov.com/mrpersister/index.html"
>
<p><a
href=
"http://jenkov.com/mrpersister/index.html"
>
Mr. Persister
</a><br
/>
Mr. Persister
</a><br
/>
Simple, small and fast object relational mapping.
Simple, small and fast object relational mapping.
...
...
h2/src/docsrc/html/mainWeb.html
浏览文件 @
574eec00
...
@@ -31,17 +31,17 @@ Welcome to H2, the free SQL database. The main feature of H2 are:
...
@@ -31,17 +31,17 @@ Welcome to H2, the free SQL database. The main feature of H2 are:
<table
style=
"border: 0px; margin: 5px; background-color: #eee;"
>
<table
style=
"border: 0px; margin: 5px; background-color: #eee;"
>
<tr><td
style=
"border: 0px; background-color: #eee;"
colspan=
"2"
>
<tr><td
style=
"border: 0px; background-color: #eee;"
colspan=
"2"
>
<h3>
Download
</h3>
<h3>
Download
</h3>
Version 1.0.6
7 (2008-02-22
):
Version 1.0.6
8 (2008-03-14
):
</td></tr>
</td></tr>
<tr><td
style=
"border: 0px; background-color: #eee;"
>
<tr><td
style=
"border: 0px; background-color: #eee;"
>
<a
href=
"http://www.h2database.com/h2-setup-2008-0
2-22
.exe"
><img
border=
"1"
src=
"images/download.png"
alt=
"download"
/></a>
<a
href=
"http://www.h2database.com/h2-setup-2008-0
3-14
.exe"
><img
border=
"1"
src=
"images/download.png"
alt=
"download"
/></a>
</td><td
style=
"vertical-align: middle; border: 0px; background-color: #eee;"
>
</td><td
style=
"vertical-align: middle; border: 0px; background-color: #eee;"
>
<a
href=
"http://www.h2database.com/h2-setup-2008-0
2-22
.exe"
>
Windows Installer (2.9 MB)
</a>
<a
href=
"http://www.h2database.com/h2-setup-2008-0
3-14
.exe"
>
Windows Installer (2.9 MB)
</a>
</td></tr>
</td></tr>
<tr><td
style=
"border: 0px; background-color: #eee;"
>
<tr><td
style=
"border: 0px; background-color: #eee;"
>
<a
href=
"http://www.h2database.com/h2-2008-0
2-22
.zip"
><img
border=
"1"
src=
"images/download.png"
alt=
"download"
/></a>
<a
href=
"http://www.h2database.com/h2-2008-0
3-14
.zip"
><img
border=
"1"
src=
"images/download.png"
alt=
"download"
/></a>
</td><td
style=
"vertical-align: middle; border: 0px; background-color: #eee;"
>
</td><td
style=
"vertical-align: middle; border: 0px; background-color: #eee;"
>
<a
href=
"http://www.h2database.com/h2-2008-0
2-22
.zip"
>
All platforms (zip, 4.1 MB)
</a>
<a
href=
"http://www.h2database.com/h2-2008-0
3-14
.zip"
>
All platforms (zip, 4.1 MB)
</a>
</td></tr>
</td></tr>
<tr><td
style=
"border: 0px; background-color: #eee;"
colspan=
"2"
>
<tr><td
style=
"border: 0px; background-color: #eee;"
colspan=
"2"
>
<a
href=
"download.html"
>
All Downloads
</a>
<a
href=
"download.html"
>
All Downloads
</a>
...
...
h2/src/docsrc/html/search.html
浏览文件 @
574eec00
...
@@ -70,6 +70,7 @@ Initial Developer: H2 Group
...
@@ -70,6 +70,7 @@ Initial Developer: H2 Group
<b>
Appendix
</b><br
/>
<b>
Appendix
</b><br
/>
<a
href=
"build.html"
target=
"main"
>
Build
</a><br
/>
<a
href=
"build.html"
target=
"main"
>
Build
</a><br
/>
<a
href=
"history.html"
target=
"main"
>
History
&
Roadmap
</a><br
/>
<a
href=
"history.html"
target=
"main"
>
History
&
Roadmap
</a><br
/>
<a
href=
"links.html"
target=
"main"
>
Links
</a><br
/>
<a
href=
"faq.html"
target=
"main"
>
FAQ
</a><br
/>
<a
href=
"faq.html"
target=
"main"
>
FAQ
</a><br
/>
<a
href=
"license.html"
target=
"main"
>
License
</a><br
/>
<a
href=
"license.html"
target=
"main"
>
License
</a><br
/>
<br
/>
<br
/>
...
...
h2/src/docsrc/javadoc/classes.html
浏览文件 @
574eec00
...
@@ -22,6 +22,7 @@ Initial Developer: H2 Group
...
@@ -22,6 +22,7 @@ Initial Developer: H2 Group
<br
/>
<br
/>
<b>
JDBC
</b><br
/>
<b>
JDBC
</b><br
/>
org.h2.jdbc
<br
/>
<a
href=
"org/h2/jdbc/JdbcArray.html"
target=
"javadoc"
>
Array
</a><br
/>
<a
href=
"org/h2/jdbc/JdbcArray.html"
target=
"javadoc"
>
Array
</a><br
/>
<a
href=
"org/h2/jdbc/JdbcBlob.html"
target=
"javadoc"
>
Blob
</a><br
/>
<a
href=
"org/h2/jdbc/JdbcBlob.html"
target=
"javadoc"
>
Blob
</a><br
/>
<a
href=
"org/h2/jdbc/JdbcCallableStatement.html"
target=
"javadoc"
>
CallableStatement
</a><br
/>
<a
href=
"org/h2/jdbc/JdbcCallableStatement.html"
target=
"javadoc"
>
CallableStatement
</a><br
/>
...
@@ -35,10 +36,15 @@ Initial Developer: H2 Group
...
@@ -35,10 +36,15 @@ Initial Developer: H2 Group
<a
href=
"org/h2/jdbc/JdbcSavepoint.html"
target=
"javadoc"
>
Savepoint
</a><br
/>
<a
href=
"org/h2/jdbc/JdbcSavepoint.html"
target=
"javadoc"
>
Savepoint
</a><br
/>
<a
href=
"org/h2/jdbc/JdbcSQLException.html"
target=
"javadoc"
>
SQLException
</a><br
/>
<a
href=
"org/h2/jdbc/JdbcSQLException.html"
target=
"javadoc"
>
SQLException
</a><br
/>
<a
href=
"org/h2/jdbc/JdbcStatement.html"
target=
"javadoc"
>
Statement
</a><br
/>
<a
href=
"org/h2/jdbc/JdbcStatement.html"
target=
"javadoc"
>
Statement
</a><br
/>
org.h2.jdbcx
<br
/>
<a
href=
"org/h2/jdbcx/JdbcDataSource.html"
target=
"javadoc"
>
DataSource
</a><br
/>
<a
href=
"org/h2/jdbcx/JdbcDataSourceFactory.html"
target=
"javadoc"
>
DataSourceFactory
</a><br
/>
<a
href=
"org/h2/jdbcx/JdbcXAConnection.html"
target=
"javadoc"
>
XAConnection
</a><br
/>
<a
href=
"org/h2/jdbcx/JdbcXid.html"
target=
"javadoc"
>
Xid
</a><br
/>
<br
/>
<br
/>
<b>
Tools
</b><br
/>
<b>
Tools
</b><br
/>
Package
org.h2.tools
<br
/>
org.h2.tools
<br
/>
<a
href=
"org/h2/tools/Backup.html"
target=
"javadoc"
>
Backup
</a><br
/>
<a
href=
"org/h2/tools/Backup.html"
target=
"javadoc"
>
Backup
</a><br
/>
<a
href=
"org/h2/tools/ChangePassword.html"
target=
"javadoc"
>
ChangePassword
</a><br
/>
<a
href=
"org/h2/tools/ChangePassword.html"
target=
"javadoc"
>
ChangePassword
</a><br
/>
<a
href=
"org/h2/tools/CompressTool.html"
target=
"javadoc"
>
CompressTool
</a><br
/>
<a
href=
"org/h2/tools/CompressTool.html"
target=
"javadoc"
>
CompressTool
</a><br
/>
...
@@ -58,14 +64,14 @@ Package org.h2.tools<br />
...
@@ -58,14 +64,14 @@ Package org.h2.tools<br />
<br
/>
<br
/>
<b>
Interfaces
</b><br
/>
<b>
Interfaces
</b><br
/>
Package
org.h2.api
<br
/>
org.h2.api
<br
/>
<a
href=
"org/h2/api/AggregateFunction.html"
target=
"javadoc"
>
AggregateFunction
</a><br
/>
<a
href=
"org/h2/api/AggregateFunction.html"
target=
"javadoc"
>
AggregateFunction
</a><br
/>
<a
href=
"org/h2/api/DatabaseEventListener.html"
target=
"javadoc"
>
DatabaseEventListener
</a><br
/>
<a
href=
"org/h2/api/DatabaseEventListener.html"
target=
"javadoc"
>
DatabaseEventListener
</a><br
/>
<a
href=
"org/h2/api/Trigger.html"
target=
"javadoc"
>
Trigger
</a><br
/>
<a
href=
"org/h2/api/Trigger.html"
target=
"javadoc"
>
Trigger
</a><br
/>
<br
/>
<br
/>
<b>
Constants
</b><br
/>
<b>
Constants
</b><br
/>
Package
org.h2.constant
<br
/>
org.h2.constant
<br
/>
<a
href=
"org/h2/constant/ErrorCode.html"
target=
"javadoc"
>
ErrorCode
</a><br
/>
<a
href=
"org/h2/constant/ErrorCode.html"
target=
"javadoc"
>
ErrorCode
</a><br
/>
<a
href=
"org/h2/constant/SysProperties.html"
target=
"javadoc"
>
SysProperties
</a><br
/>
<a
href=
"org/h2/constant/SysProperties.html"
target=
"javadoc"
>
SysProperties
</a><br
/>
<br
/>
<br
/>
...
...
h2/src/docsrc/javadoc/index.html
浏览文件 @
574eec00
...
@@ -9,7 +9,7 @@ Initial Developer: H2 Group
...
@@ -9,7 +9,7 @@ Initial Developer: H2 Group
<title>
H2 Documentation
</title>
<title>
H2 Documentation
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"stylesheet.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"stylesheet.css"
/>
</head>
</head>
<frameset
cols=
"1
7
5,*"
rows=
"*"
frameborder=
"2"
framespacing=
"4"
border=
"4"
>
<frameset
cols=
"1
8
5,*"
rows=
"*"
frameborder=
"2"
framespacing=
"4"
border=
"4"
>
<frame
frameborder=
"0"
marginheight=
"0"
marginwidth=
"0"
src=
"classes.html"
name=
"classes"
/>
<frame
frameborder=
"0"
marginheight=
"0"
marginwidth=
"0"
src=
"classes.html"
name=
"classes"
/>
<frame
frameborder=
"0"
marginheight=
"0"
marginwidth=
"0"
src=
"overview.html"
name=
"javadoc"
/>
<frame
frameborder=
"0"
marginheight=
"0"
marginwidth=
"0"
src=
"overview.html"
name=
"javadoc"
/>
</frameset>
</frameset>
...
...
h2/src/docsrc/text/_docs_en.utf8.txt
浏览文件 @
574eec00
差异被折叠。
点击展开。
h2/src/docsrc/text/_docs_ja.utf8.txt
浏览文件 @
574eec00
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_docs_en.properties
浏览文件 @
574eec00
This source diff could not be displayed because it is too large. You can
view the blob
instead.
h2/src/main/org/h2/Driver.java
浏览文件 @
574eec00
...
@@ -19,9 +19,13 @@ import org.h2.message.TraceSystem;
...
@@ -19,9 +19,13 @@ import org.h2.message.TraceSystem;
/**
/**
* The database driver. An application should not use this class directly. The
* The database driver. An application should not use this class directly. The
* only thing the application needs to do is load the driver. This can be done
* only thing the application needs to do is load the driver. This can be done
* using Class.forName:
* using Class.forName. To load the driver and open a database connection, use
* the following code:
*
* <pre>
* <pre>
* Class.forName("org.h2.Driver");
* Class.forName("org.h2.Driver");
* Connection conn = DriverManager.getConnection(
* "jdbc:h2:˜/test", "sa", "sa");
* </pre>
* </pre>
*/
*/
public
class
Driver
implements
java
.
sql
.
Driver
{
public
class
Driver
implements
java
.
sql
.
Driver
{
...
...
h2/src/main/org/h2/constant/SysProperties.java
浏览文件 @
574eec00
...
@@ -217,9 +217,7 @@ public class SysProperties {
...
@@ -217,9 +217,7 @@ public class SysProperties {
* more than this number of rows are in a result set, a temporary table is
* more than this number of rows are in a result set, a temporary table is
* used.
* used.
*/
*/
private
int
testing
;
public
static
final
int
MAX_MEMORY_ROWS_DISTINCT
=
getIntSetting
(
"h2.maxMemoryRowsDistinct"
,
Integer
.
MAX_VALUE
);
// public static final int MAX_MEMORY_ROWS_DISTINCT = getIntSetting("h2.maxMemoryRowsDistinct", Integer.MAX_VALUE);
public
static
final
int
MAX_MEMORY_ROWS_DISTINCT
=
getIntSetting
(
"h2.maxMemoryRowsDistinct"
,
1
);
/**
/**
* System property <code>h2.maxQueryTimeout</code> (default: 0).<br />
* System property <code>h2.maxQueryTimeout</code> (default: 0).<br />
...
...
h2/src/main/org/h2/engine/Constants.java
浏览文件 @
574eec00
...
@@ -15,8 +15,8 @@ package org.h2.engine;
...
@@ -15,8 +15,8 @@ package org.h2.engine;
* - Compile with JDK 1.4, 1.5 and 1.6:
* - Compile with JDK 1.4, 1.5 and 1.6:
* set path=C:\Programme\Java\jdk1.6.0\bin;%PATH%
* set path=C:\Programme\Java\jdk1.6.0\bin;%PATH%
* set JAVA_HOME=C:\Programme\Java\jdk1.6.0
* set JAVA_HOME=C:\Programme\Java\jdk1.6.0
* set path=C:\Program Files\Java\jdk1.6.0_0
1
\bin;%PATH%
* set path=C:\Program Files\Java\jdk1.6.0_0
3
\bin;%PATH%
* set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_0
1
* set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_0
3
* ant compile
* ant compile
* set classpath=
* set classpath=
* ant javadoc
* ant javadoc
...
@@ -74,8 +74,8 @@ package org.h2.engine;
...
@@ -74,8 +74,8 @@ package org.h2.engine;
*/
*/
public
class
Constants
{
public
class
Constants
{
public
static
final
int
BUILD_ID
=
6
7
;
public
static
final
int
BUILD_ID
=
6
8
;
private
static
final
String
BUILD
=
"2008-0
2-22
"
;
private
static
final
String
BUILD
=
"2008-0
3-14
"
;
public
static
final
int
VERSION_MAJOR
=
1
;
public
static
final
int
VERSION_MAJOR
=
1
;
public
static
final
int
VERSION_MINOR
=
0
;
public
static
final
int
VERSION_MINOR
=
0
;
...
...
h2/src/main/org/h2/jdbcx/JdbcDataSource.java
浏览文件 @
574eec00
...
@@ -36,7 +36,35 @@ import org.h2.message.Message;
...
@@ -36,7 +36,35 @@ import org.h2.message.Message;
/**
/**
* A data source for H2 database connections. It is a factory for XAConnection
* A data source for H2 database connections. It is a factory for XAConnection
* and Connection objects. This class is usually registered in a JNDI naming
* and Connection objects. This class is usually registered in a JNDI naming
* service.
* service. To create a data source object and register it with a JNDI service,
* use the following code:
*
* <pre>
* import org.h2.jdbcx.JdbcDataSource;
* import javax.naming.Context;
* import javax.naming.InitialContext;
* JdbcDataSource ds = new JdbcDataSource();
* ds.setURL("jdbc:h2:˜/test");
* ds.setUser("sa");
* ds.setPassword("sa");
* Context ctx = new InitialContext();
* ctx.bind("jdbc/dsName", ds);
* </pre>
*
* To use a data source that is already registered, use the following code:
*
* <pre>
* import java.sql.Connection;
* import javax.sql.DataSource;
* import javax.naming.Context;
* import javax.naming.InitialContext;
* Context ctx = new InitialContext();
* DataSource ds = (DataSource) ctx.lookup("jdbc/dsName");
* Connection conn = ds.getConnection();
* </pre>
*
* In this example the user name and password are serialized as
* well; this may be a security problem in some cases.
*/
*/
public
class
JdbcDataSource
extends
TraceObject
public
class
JdbcDataSource
extends
TraceObject
//#ifdef JDK14
//#ifdef JDK14
...
@@ -58,7 +86,7 @@ implements XADataSource, DataSource, ConnectionPoolDataSource, Serializable, Ref
...
@@ -58,7 +86,7 @@ implements XADataSource, DataSource, ConnectionPoolDataSource, Serializable, Ref
}
}
/**
/**
*
P
ublic constructor.
*
The p
ublic constructor.
*/
*/
public
JdbcDataSource
()
{
public
JdbcDataSource
()
{
initFactory
();
initFactory
();
...
...
h2/src/main/org/h2/jdbcx/JdbcDataSourceFactory.java
浏览文件 @
574eec00
...
@@ -20,7 +20,8 @@ import org.h2.message.Trace;
...
@@ -20,7 +20,8 @@ import org.h2.message.Trace;
import
org.h2.message.TraceSystem
;
import
org.h2.message.TraceSystem
;
/**
/**
* This class is used to create new JdbcDataSource objects.
* This class is used to create new DataSource objects.
* An application should not use this class directly.
*/
*/
public
class
JdbcDataSourceFactory
public
class
JdbcDataSourceFactory
//#ifdef JDK14
//#ifdef JDK14
...
...
h2/src/main/org/h2/result/ResultTempTable.java
浏览文件 @
574eec00
...
@@ -97,7 +97,7 @@ public class ResultTempTable implements ResultExternal {
...
@@ -97,7 +97,7 @@ public class ResultTempTable implements ResultExternal {
table
.
removeChildrenAndResources
(
session
);
table
.
removeChildrenAndResources
(
session
);
}
}
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
throw
Message
.
getInternalError
(
);
throw
Message
.
convertToInternal
(
e
);
}
finally
{
}
finally
{
table
=
null
;
table
=
null
;
}
}
...
...
h2/src/main/org/h2/result/RowList.java
浏览文件 @
574eec00
...
@@ -151,7 +151,16 @@ public class RowList {
...
@@ -151,7 +151,16 @@ public class RowList {
int
storageId
=
buff
.
readInt
();
int
storageId
=
buff
.
readInt
();
Value
[]
values
=
new
Value
[
columnCount
];
Value
[]
values
=
new
Value
[
columnCount
];
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
values
[
i
]
=
buff
.
readValue
();
Value
v
=
buff
.
readValue
();
if
(
v
.
isLinked
())
{
ValueLob
lob
=
(
ValueLob
)
v
;
// the table id is 0 if it was linked when writing
// a temporary entry
if
(
lob
.
getTableId
()
==
0
)
{
session
.
unlinkAtCommit
(
v
);
}
}
values
[
i
]
=
v
;
}
}
if
(
pos
!=
0
)
{
if
(
pos
!=
0
)
{
CacheObject
found
=
cache
.
find
(
pos
);
CacheObject
found
=
cache
.
find
(
pos
);
...
...
h2/src/test/org/h2/samples/Newsfeed.java
浏览文件 @
574eec00
...
@@ -25,6 +25,7 @@ import org.h2.util.StringUtils;
...
@@ -25,6 +25,7 @@ import org.h2.util.StringUtils;
public
class
Newsfeed
{
public
class
Newsfeed
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
String
targetDir
=
args
.
length
==
0
?
"."
:
args
[
0
];
Class
.
forName
(
"org.h2.Driver"
);
Class
.
forName
(
"org.h2.Driver"
);
Connection
conn
=
DriverManager
.
getConnection
(
"jdbc:h2:mem:"
,
"sa"
,
""
);
Connection
conn
=
DriverManager
.
getConnection
(
"jdbc:h2:mem:"
,
"sa"
,
""
);
InputStream
in
=
Newsfeed
.
class
.
getResourceAsStream
(
"newsfeed.sql"
);
InputStream
in
=
Newsfeed
.
class
.
getResourceAsStream
(
"newsfeed.sql"
);
...
@@ -32,16 +33,15 @@ public class Newsfeed {
...
@@ -32,16 +33,15 @@ public class Newsfeed {
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
String
file
=
rs
.
getString
(
"FILE"
);
String
file
=
rs
.
getString
(
"FILE"
);
String
content
=
rs
.
getString
(
"CONTENT"
);
String
content
=
rs
.
getString
(
"CONTENT"
);
if
(
file
.
e
quals
(
"-newsletter-
"
))
{
if
(
file
.
e
ndsWith
(
".txt
"
))
{
System
.
out
.
println
(
convertHtml2Text
(
content
)
);
content
=
convertHtml2Text
(
content
);
}
else
{
}
FileOutputStream
out
=
new
FileOutputStream
(
file
);
FileOutputStream
out
=
new
FileOutputStream
(
targetDir
+
"/"
+
file
);
Writer
writer
=
new
OutputStreamWriter
(
out
,
"UTF-8"
);
Writer
writer
=
new
OutputStreamWriter
(
out
,
"UTF-8"
);
writer
.
write
(
content
);
writer
.
write
(
content
);
writer
.
close
();
writer
.
close
();
out
.
close
();
out
.
close
();
}
}
}
conn
.
close
();
conn
.
close
();
}
}
...
...
h2/src/test/org/h2/samples/newsfeed.sql
浏览文件 @
574eec00
...
@@ -10,6 +10,49 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' ,
...
@@ -10,6 +10,49 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' ,
CREATE
TABLE
ITEM
(
ID
INT
PRIMARY
KEY
,
TITLE
VARCHAR
,
ISSUED
TIMESTAMP
,
DESC
VARCHAR
);
CREATE
TABLE
ITEM
(
ID
INT
PRIMARY
KEY
,
TITLE
VARCHAR
,
ISSUED
TIMESTAMP
,
DESC
VARCHAR
);
INSERT
INTO
ITEM
VALUES
(
38
,
'New version available: 1.0.68 (2008-03-14)'
,
'2008-03-14 12:00:00'
,
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
(You may have to click
''
Refresh
''
).
<br />
<b>Changes and new functionality:</b>
<ul><li>Faster text comparison when using a collator.
</li><li>CSVWRITE now supports a
''
null string
''
to parse NULL.
</li><li>UPDATE SET column=DEFAULT is now supported.
</li><li>Large SELECT DISTINCT and UNION queries are now supported
(this is disabled by default).
</li><li>Committing inside a trigger is not allowed any more.
</li><li>ALTER SEQUENCE can now be used inside a transaction.
</li><li>New system property h2.aliasColumnName. When enabled, aliased columns
return the real table and column name in ResultSetMetaData calls.
</li><li>Improved performance when using lob files in directories
(however this is still disabled by default)
</li><li>Fulltext search: new method SEARCH_DATA.
</li><li>New experimental optimization for GROUP BY queries.
</li><li>Better browser starting for the H2 Console on Linux.
</li><li>Improved support for IKVM.
</li></ul>
<b>Bugfixes:</b>
<ul><li>With MVCC=TRUE, duplicate rows could appear in the result set.
</li><li>Queries with many outer join tables were very slow.
</li><li>Unused LOB files were deleted much too late.
</li><li>H2 Console: remote connections were very slow.
</li><li>H2 Console: autocomplete didn
''
t work with very large scripts.
</li><li>H2 Console: improved compatibility with Safari (Safari requires keep-alive)
</li><li>Random: the process didn
''
t stop if generateSeed was very slow.
</li><li>SELECT UNION with a different number of ORDER BY columns didn
''
t work.
</li><li>When using a view, the column precision was wrong sometimes.
</li><li>Some long running queries could not be cancelled.
</li><li>When using encrypted databases, and using the wrong file password,
the log file was renamed sometimes.
</li></ul>
For details, see the
''
Change Log
''
at
http://www.h2database.com/html/changelog.html
<br />
For future plans, see the
''
Roadmap
''
page at
http://www.h2database.com/html/roadmap.html
'
);
INSERT
INTO
ITEM
VALUES
(
37
,
INSERT
INTO
ITEM
VALUES
(
37
,
'New version available: 1.0.67 (2008-02-22)'
,
'2008-02-22 12:00:00'
,
'New version available: 1.0.67 (2008-02-22)'
,
'2008-02-22 12:00:00'
,
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
...
@@ -300,43 +343,6 @@ INSERT INTO ITEM VALUES(29,
...
@@ -300,43 +343,6 @@ INSERT INTO ITEM VALUES(29,
For future plans, see the new
''
Roadmap
''
page on the web site.
For future plans, see the new
''
Roadmap
''
page on the web site.
'
);
'
);
INSERT
INTO
ITEM
VALUES
(
28
,
'New version available: 1.0.58 (2007-09-15)'
,
'2007-09-15 12:00:00'
,
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
(You may have to click
''
Refresh
''
).
<br />
<b>Changes and new functionality:</b>
<ul><li>Empty space in the database files is now better reused
</li><li>The database file sizes now increased in smaller blocks
</li><li>Optimization for independent subqueries
</li><li>Improved explain plan
</li><li>Maven 2: new version are now automatically synced
</li><li>The version (build) number is now included in the manifest file.
</li><li>The default value for MAX_MEMORY_UNDO is now 100000
</li><li>Improved MultiDimension tool (for spatial queries)
</li><li>New method DatabaseEventListener.opened
</li><li>Optimization for COLUMN IN(.., NULL)
</li><li>Oracle compatibility for SYSDATE and CHR
</li><li>System.exit is no longer called by the WebServer
</li></ul>
<b>Bugfixes:</b>
<ul><li>About 230 bytes per database was leaked
</li><li>Using spaces in column and table aliases did not always work
</li><li>In some systems, SecureRandom.generateSeed is very slow
</li><li>Console: better support for Internet Explorer
</li><li>A database can now be opened even if user class is missing
</li><li>User defined functions may not overload built-in functions
</li><li>Adding a foreign key failed when the reference contained NULL
</li><li>For PgServer, character encoding other than UTF-8 did not work
</li><li>When using IFNULL, NULLIF, COALESCE, LEAST, or GREATEST,
and the first parameter was ?, an exception was thrown
</li><li>When comparing TINYINT or SMALLINT columns, the index was not used
</li><li>The documentation indexer does no longer index Japanese pages
</li><li>Using a function in a GROUP BY expression did not always work
</li></ul>
For future plans, see the new
''
Roadmap
''
page on the web site.
'
);
SELECT
'newsfeed-rss.xml'
FILE
,
SELECT
'newsfeed-rss.xml'
FILE
,
XMLSTARTDOC
()
||
XMLSTARTDOC
()
||
XMLNODE
(
'rss'
,
XMLATTR
(
'version'
,
'2.0'
),
XMLNODE
(
'rss'
,
XMLATTR
(
'version'
,
'2.0'
),
...
@@ -378,4 +384,4 @@ SELECT 'newsfeed-atom.xml' FILE,
...
@@ -378,4 +384,4 @@ SELECT 'newsfeed-atom.xml' FILE,
)
CONTENT
)
CONTENT
FROM
CHANNEL
C
,
ITEM
I
FROM
CHANNEL
C
,
ITEM
I
UNION
UNION
SELECT
'
-newsletter-
'
FILE
,
I
.
DESC
CONTENT
FROM
ITEM
I
WHERE
I
.
ID
=
(
SELECT
MAX
(
ID
)
FROM
ITEM
)
SELECT
'
newsletter.txt
'
FILE
,
I
.
DESC
CONTENT
FROM
ITEM
I
WHERE
I
.
ID
=
(
SELECT
MAX
(
ID
)
FROM
ITEM
)
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
574eec00
...
@@ -159,12 +159,13 @@ java org.h2.test.TestAll timer
...
@@ -159,12 +159,13 @@ java org.h2.test.TestAll timer
/*
/*
disk based select distinct; order by:
Allow to set all passwords as parameters
Remove Parser.readString()
more tests with disk based select distinct; order by:
select distinct x from system_range(1, 200000);
DROP TABLE TEST;
DROP TABLE TEST;
CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255), VALUE DECIMAL(10,2));
CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255), VALUE DECIMAL(10,2));
INSERT INTO TEST VALUES(1,'Apples',1.20),
INSERT INTO TEST VALUES(1,'Apples',1.20),
(2,'Oranges',2.05),
(2,'Oranges',2.05),
(3,'Cherries',5.10),
(3,'Cherries',5.10),
...
@@ -174,36 +175,38 @@ INSERT INTO TEST VALUES(1,'Apples',1.20),
...
@@ -174,36 +175,38 @@ INSERT INTO TEST VALUES(1,'Apples',1.20),
(7,'Bananas',2.50),
(7,'Bananas',2.50),
(8,NULL,3.10),
(8,NULL,3.10),
(9,NULL,-10.0);
(9,NULL,-10.0);
SELECT DISTINCT NAME FROM TEST;
SELECT DISTINCT NAME FROM TEST;
select distinct x from system_range(1, 200000);
CREATE TABLE p(d DATE);
CREATE TABLE p(d DATE);
INSERT INTO p VALUES('0000-01-01');
INSERT INTO p VALUES('0000-01-01');
INSERT INTO p VALUES('0001-01-01');
INSERT INTO p VALUES('0001-01-01');
check that test data in temp directories
add jdbcx to Javadocs
out of memory problem:
out of memory problem:
java -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -cp bin/h2.jar org.h2.tools.Server -log true
java -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m
-cp bin/h2.jar org.h2.tools.Server -log true
jdbc:h2:test;CACHE_SIZE=10000
jdbc:h2:test;CACHE_SIZE=10000
drop all objects;
drop all objects;
CREATE TABLE firsttable (id number(8) primary key, name varchar(200) not null);
CREATE TABLE test (field1 number(10) not null, field2 number(8));
CREATE TABLE secondtable (field1 number(10) not null, field2 number(8));
@LOOP 1000000 insert into test values(?, ?);
@LOOP 1000000 insert into secondtable values(?, ?);
create index idx_number1 on test(field1);
create index idx_number1 on secondtable(field1);
The table 'test' contains a little over 100.000.000 records.
The table 'secondtable' contains a little over 100.000.000 records.
Read HenPlus features
Read HenPlus features
http://henplus.sourceforge.net/
http://henplus.sourceforge.net/
newsletter.sql
better document DataSource usage in an own section in the Tutorial.
Including Pooling if possible
link to or include
http://www.source-code.biz/snippets/java/8.htm
add regular javadocs to the homepage
the database should be kept open for a longer time when using the server mode
add link to new in use, links
add link to new in use, links
Javadocs: for each tool, add a copy & paste sample in the class level
Add google site search to web page
Add google site search to web page
merge query and result frames
merge query and result frames
...
@@ -230,13 +233,6 @@ Can sometimes not delete log file? need test case
...
@@ -230,13 +233,6 @@ Can sometimes not delete log file? need test case
Add where required // TODO: change in version 1.1
Add where required // TODO: change in version 1.1
History:
History:
Very large SELECT DISTINCT and UNION EXCEPT queries are now supported.
Improved support for IKVM.
A error is now thrown when trying to call a method
inside a trigger that implicitly commits the current transaction,
if an object is locked.
Unused LOB files were deleted much too late.
Now they are deleted if no longer referenced in memory.
Roadmap:
Roadmap:
...
...
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
574eec00
...
@@ -30,7 +30,8 @@ import org.h2.tools.DeleteDbFiles;
...
@@ -30,7 +30,8 @@ import org.h2.tools.DeleteDbFiles;
*/
*/
public
abstract
class
TestBase
{
public
abstract
class
TestBase
{
// private static final String BASE_TEST_DIR = System.getProperty("java.io.tmpdir") + "/h2";
// private static final String BASE_TEST_DIR =
// System.getProperty("java.io.tmpdir") + "/h2";
private
static
final
String
BASE_TEST_DIR
=
"data"
;
private
static
final
String
BASE_TEST_DIR
=
"data"
;
public
static
String
getTestDir
(
String
name
)
{
public
static
String
getTestDir
(
String
name
)
{
...
...
h2/src/test/org/h2/test/jdbcx/TestDataSource.java
浏览文件 @
574eec00
...
@@ -22,29 +22,29 @@ import org.h2.test.TestBase;
...
@@ -22,29 +22,29 @@ import org.h2.test.TestBase;
*/
*/
public
class
TestDataSource
extends
TestBase
{
public
class
TestDataSource
extends
TestBase
{
//
public static void main(String[] args) throws Exception {
//
public static void main(String[] args) throws Exception {
//
//
//
// first, need to start on the command line:
//
// first, need to start on the command line:
//
// rmiregistry 1099
//
// rmiregistry 1099
//
//
//
// System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
//
// System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
//
"com.sun.jndi.ldap.LdapCtxFactory");
//
"com.sun.jndi.ldap.LdapCtxFactory");
//
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
//
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
//
"com.sun.jndi.rmi.registry.RegistryContextFactory");
//
"com.sun.jndi.rmi.registry.RegistryContextFactory");
//
System.setProperty(Context.PROVIDER_URL, "rmi://localhost:1099");
//
System.setProperty(Context.PROVIDER_URL, "rmi://localhost:1099");
//
//
//
JdbcDataSource ds = new JdbcDataSource();
//
JdbcDataSource ds = new JdbcDataSource();
//
ds.setURL("jdbc:h2:test");
//
ds.setURL("jdbc:h2:test");
//
ds.setUser("test");
//
ds.setUser("test");
//
ds.setPassword("");
//
ds.setPassword("");
//
//
//
Context ctx = new InitialContext();
//
Context ctx = new InitialContext();
//
ctx.bind("jdbc/test", ds);
//
ctx.bind("jdbc/test", ds);
//
//
//
DataSource ds2 = (DataSource)ctx.lookup("jdbc/test");
//
DataSource ds2 = (DataSource)ctx.lookup("jdbc/test");
//
Connection conn = ds2.getConnection();
//
Connection conn = ds2.getConnection();
//
conn.close();
//
conn.close();
//
}
//
}
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
testDataSource
();
testDataSource
();
...
...
h2/src/tools/org/h2/tools/code/CheckTextFiles.java
浏览文件 @
574eec00
...
@@ -22,7 +22,7 @@ public class CheckTextFiles {
...
@@ -22,7 +22,7 @@ public class CheckTextFiles {
}
}
String
[]
suffixCheck
=
new
String
[]
{
"html"
,
"jsp"
,
"js"
,
"css"
,
"bat"
,
"nsi"
,
"java"
,
"txt"
,
"properties"
,
"sql"
,
String
[]
suffixCheck
=
new
String
[]
{
"html"
,
"jsp"
,
"js"
,
"css"
,
"bat"
,
"nsi"
,
"java"
,
"txt"
,
"properties"
,
"sql"
,
"xml"
,
"csv"
,
"Driver"
,
"php"
};
"xml"
,
"csv"
,
"Driver"
};
String
[]
suffixIgnore
=
new
String
[]
{
"gif"
,
"png"
,
"odg"
,
"ico"
,
"sxd"
,
"layout"
,
"res"
,
"win"
,
"jar"
,
"task"
};
String
[]
suffixIgnore
=
new
String
[]
{
"gif"
,
"png"
,
"odg"
,
"ico"
,
"sxd"
,
"layout"
,
"res"
,
"win"
,
"jar"
,
"task"
};
boolean
failOnError
;
boolean
failOnError
;
boolean
allowTab
,
allowCR
=
true
,
allowTrailingSpaces
=
true
;
boolean
allowTab
,
allowCR
=
true
,
allowTrailingSpaces
=
true
;
...
...
h2/src/tools/org/h2/tools/doc/MergeDocs.java
浏览文件 @
574eec00
...
@@ -25,16 +25,18 @@ public class MergeDocs {
...
@@ -25,16 +25,18 @@ public class MergeDocs {
}
}
private
void
run
(
String
[]
args
)
throws
Exception
{
private
void
run
(
String
[]
args
)
throws
Exception
{
// the order of pages is important here
String
[]
pages
=
{
"quickstartText.html"
,
"installation.html"
,
"tutorial.html"
,
"features.html"
,
String
[]
pages
=
{
"quickstartText.html"
,
"installation.html"
,
"tutorial.html"
,
"features.html"
,
"performance.html"
,
"advanced.html"
,
"grammar.html"
,
"functions.html"
,
"datatypes.html"
,
"build.html"
,
"performance.html"
,
"advanced.html"
,
"grammar.html"
,
"functions.html"
,
"datatypes.html"
,
"build.html"
,
"history.html"
,
"faq.html"
,
"license.html"
};
"history.html"
,
"faq.html"
,
"license.html"
};
StringBuffer
buff
=
new
StringBuffer
();
StringBuffer
buff
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
pages
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
pages
.
length
;
i
++)
{
String
text
=
getContent
(
pages
[
i
]);
String
fileName
=
pages
[
i
];
String
text
=
getContent
(
fileName
);
for
(
int
j
=
0
;
j
<
pages
.
length
;
j
++)
{
for
(
int
j
=
0
;
j
<
pages
.
length
;
j
++)
{
text
=
StringUtils
.
replaceAll
(
text
,
pages
[
j
]
+
"#"
,
"#"
);
text
=
StringUtils
.
replaceAll
(
text
,
pages
[
j
]
+
"#"
,
"#"
);
}
}
text
=
removeHeaderFooter
(
text
);
text
=
removeHeaderFooter
(
fileName
,
text
);
buff
.
append
(
text
);
buff
.
append
(
text
);
}
}
String
finalText
=
buff
.
toString
();
String
finalText
=
buff
.
toString
();
...
@@ -48,7 +50,7 @@ public class MergeDocs {
...
@@ -48,7 +50,7 @@ public class MergeDocs {
writer
.
close
();
writer
.
close
();
}
}
private
String
removeHeaderFooter
(
String
text
)
{
private
String
removeHeaderFooter
(
String
fileName
,
String
text
)
{
// String start = "<body";
// String start = "<body";
// String end = "</body>";
// String end = "</body>";
...
@@ -56,6 +58,9 @@ public class MergeDocs {
...
@@ -56,6 +58,9 @@ public class MergeDocs {
String
end
=
"</div></td></tr></table><!-- analytics --></body></html>"
;
String
end
=
"</div></td></tr></table><!-- analytics --></body></html>"
;
int
idx
=
text
.
indexOf
(
end
);
int
idx
=
text
.
indexOf
(
end
);
if
(
idx
<
0
)
{
throw
new
Error
(
"Footer not found in file "
+
fileName
);
}
text
=
text
.
substring
(
0
,
idx
);
text
=
text
.
substring
(
0
,
idx
);
idx
=
text
.
indexOf
(
start
);
idx
=
text
.
indexOf
(
start
);
idx
=
text
.
indexOf
(
'>'
,
idx
);
idx
=
text
.
indexOf
(
'>'
,
idx
);
...
...
h2/src/tools/org/h2/tools/doc/SpellChecker.java
浏览文件 @
574eec00
...
@@ -33,7 +33,7 @@ public class SpellChecker {
...
@@ -33,7 +33,7 @@ public class SpellChecker {
private
boolean
printDictionary
=
false
;
private
boolean
printDictionary
=
false
;
private
boolean
addToDictionary
;
private
boolean
addToDictionary
;
private
static
final
String
[]
SUFFIX
=
new
String
[]
{
"html"
,
"java"
,
"sql"
,
"txt"
,
"xml"
,
"jsp"
,
"css"
,
"bat"
,
private
static
final
String
[]
SUFFIX
=
new
String
[]
{
"html"
,
"java"
,
"sql"
,
"txt"
,
"xml"
,
"jsp"
,
"css"
,
"bat"
,
"csv"
,
"xml"
,
"js"
,
"Driver"
,
"properties"
,
"task"
,
"
php"
,
"
"
};
"csv"
,
"xml"
,
"js"
,
"Driver"
,
"properties"
,
"task"
,
""
};
private
static
final
String
[]
IGNORE
=
new
String
[]
{
"dev"
,
"nsi"
,
"gif"
,
"png"
,
"odg"
,
"ico"
,
"sxd"
,
"zip"
,
private
static
final
String
[]
IGNORE
=
new
String
[]
{
"dev"
,
"nsi"
,
"gif"
,
"png"
,
"odg"
,
"ico"
,
"sxd"
,
"zip"
,
"bz2"
,
"rc"
,
"layout"
,
"res"
,
"dll"
,
"jar"
};
"bz2"
,
"rc"
,
"layout"
,
"res"
,
"dll"
,
"jar"
};
private
static
final
String
PREFIX_IGNORE
=
"abc"
;
private
static
final
String
PREFIX_IGNORE
=
"abc"
;
...
...
h2/src/tools/org/h2/tools/doc/WebSite.java
浏览文件 @
574eec00
...
@@ -10,6 +10,7 @@ import java.io.FileInputStream;
...
@@ -10,6 +10,7 @@ import java.io.FileInputStream;
import
java.io.FileOutputStream
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
org.h2.samples.Newsfeed
;
import
org.h2.util.IOUtils
;
import
org.h2.util.IOUtils
;
import
org.h2.util.StringUtils
;
import
org.h2.util.StringUtils
;
...
@@ -17,6 +18,7 @@ import org.h2.util.StringUtils;
...
@@ -17,6 +18,7 @@ import org.h2.util.StringUtils;
* Create the web site, mainly by copying the regular docs. A few items are
* Create the web site, mainly by copying the regular docs. A few items are
* different in the web site, for example it calls web site analytics.
* different in the web site, for example it calls web site analytics.
* Also, the main entry point page is different.
* Also, the main entry point page is different.
* The newsfeeds are generated here as well.
*/
*/
public
class
WebSite
{
public
class
WebSite
{
...
@@ -25,7 +27,7 @@ public class WebSite {
...
@@ -25,7 +27,7 @@ public class WebSite {
private
static
final
String
ANALYTICS_TAG
=
"<!-- analytics -->"
;
private
static
final
String
ANALYTICS_TAG
=
"<!-- analytics -->"
;
private
static
final
String
ANALYTICS_SCRIPT
=
private
static
final
String
ANALYTICS_SCRIPT
=
"<script src=
'http://www.google-analytics.com/ga.js' type=\"text/javascript\" /
>\n"
+
"<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>"
;
"<script type=\"text/javascript\">var pageTracker=_gat._getTracker(\"UA-2351060-1\");pageTracker._initData();pageTracker._trackPageview();</script>"
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
...
@@ -35,6 +37,7 @@ public class WebSite {
...
@@ -35,6 +37,7 @@ public class WebSite {
private
void
run
()
throws
Exception
{
private
void
run
()
throws
Exception
{
deleteRecursive
(
new
File
(
targetDir
));
deleteRecursive
(
new
File
(
targetDir
));
copy
(
new
File
(
sourceDir
),
new
File
(
targetDir
));
copy
(
new
File
(
sourceDir
),
new
File
(
targetDir
));
Newsfeed
.
main
(
new
String
[]
{
"dataWeb/html"
});
}
}
private
void
deleteRecursive
(
File
dir
)
{
private
void
deleteRecursive
(
File
dir
)
{
...
...
h2/src/tools/org/h2/tools/doc/dictionary.txt
浏览文件 @
574eec00
...
@@ -482,4 +482,5 @@ xmlstartdoc xmltext xor xrmd xrunhprof xsi xsm xtea xti xtime xts xvi xyz yacute
...
@@ -482,4 +482,5 @@ xmlstartdoc xmltext xor xrmd xrunhprof xsi xsm xtea xti xtime xts xvi xyz yacute
year yen yes yet yield yielding ymd you your yourkit yourself ytd yuml yusuke
year yen yes yet yield yielding ymd you your yourkit yourself ytd yuml yusuke
yyyy zeile zero zeros zeta zip zloty zone zwj zwnj
yyyy zeile zero zeros zeta zip zloty zone zwj zwnj
cron ide pageview track gat analytics tracker implicitly ignores
cron ide pageview track gat analytics tracker implicitly ignores pro providers
\ No newline at end of file
tmpdir mini
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论