Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
abc0e805
提交
abc0e805
authored
2月 11, 2010
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Documentation.
上级
fc60923d
显示空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
248 行增加
和
166 行删除
+248
-166
changelog.html
h2/src/docsrc/html/changelog.html
+11
-9
faq.html
h2/src/docsrc/html/faq.html
+5
-10
roadmap.html
h2/src/docsrc/html/roadmap.html
+1
-1
classes.html
h2/src/docsrc/javadoc/classes.html
+0
-1
Bnf.java
h2/src/main/org/h2/bnf/Bnf.java
+7
-1
SysProperties.java
h2/src/main/org/h2/constant/SysProperties.java
+1
-1
WebApp.java
h2/src/main/org/h2/server/web/WebApp.java
+29
-1
DataReader.java
h2/src/main/org/h2/store/DataReader.java
+3
-2
PageOutputStream.java
h2/src/main/org/h2/store/PageOutputStream.java
+13
-0
Profiler.java
h2/src/main/org/h2/util/Profiler.java
+0
-10
test-1.2.txt
h2/src/test/org/h2/test/test-1.2.txt
+18
-0
TestDataPage.java
h2/src/test/org/h2/test/unit/TestDataPage.java
+3
-1
TestNetUtils.java
h2/src/test/org/h2/test/unit/TestNetUtils.java
+124
-125
TestValueHashMap.java
h2/src/test/org/h2/test/unit/TestValueHashMap.java
+3
-3
TestValueMemory.java
h2/src/test/org/h2/test/unit/TestValueMemory.java
+8
-0
BnfRailroad.java
h2/src/tools/org/h2/build/doc/BnfRailroad.java
+6
-0
BnfSyntax.java
h2/src/tools/org/h2/build/doc/BnfSyntax.java
+14
-0
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+2
-1
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
abc0e805
...
@@ -18,7 +18,10 @@ Change Log
...
@@ -18,7 +18,10 @@ Change Log
<h1>
Change Log
</h1>
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
The BNF parser now uses the visitor pattern.
<ul><li>
When doing an index lookup, decimal values with the same value but different scale
(for example 0.00 and 0.0) where not considered equal in version 1.2.128.
Now they are (unlike BigDecimal.equals()).
</li><li>
The BNF parser now uses the visitor pattern.
</li><li>
The methods of the CloseListener are added to the Trigger interface.
</li><li>
The methods of the CloseListener are added to the Trigger interface.
The interface CloseListener is removed.
The interface CloseListener is removed.
</li><li>
Converting a UUID to bytes was incorrect. Because of that, updatable result sets on
</li><li>
Converting a UUID to bytes was incorrect. Because of that, updatable result sets on
...
@@ -28,8 +31,7 @@ Change Log
...
@@ -28,8 +31,7 @@ Change Log
</li><li>
H2 Console: asynchronous login (using a DatabaseEventListener) is no longer supported.
</li><li>
H2 Console: asynchronous login (using a DatabaseEventListener) is no longer supported.
</li><li>
A workaround for a Windows socket problem has been implemented. Thanks a lot to Sergi Vladykin.
</li><li>
A workaround for a Windows socket problem has been implemented. Thanks a lot to Sergi Vladykin.
</li><li>
The Recover tool did not convert correctly convert CLOB data with non-ASCII characters.
</li><li>
The Recover tool did not convert correctly convert CLOB data with non-ASCII characters.
</li><li>
Tools: the method run(String... args) has been renamed to runTool(String... args)
</li><li>
Tools: the method run(String... args) has been renamed to runTool(String... args).
so it can't be confused with run().
</li><li>
Server.startWebServer(Connection) was not working as expected.
</li><li>
Server.startWebServer(Connection) was not working as expected.
</li><li>
The database URL option ACCESS_MODE_LOG is no longer supported.
</li><li>
The database URL option ACCESS_MODE_LOG is no longer supported.
</li><li>
The database URL option RECOVER has currently no effect.
</li><li>
The database URL option RECOVER has currently no effect.
...
...
h2/src/docsrc/html/faq.html
浏览文件 @
abc0e805
...
@@ -57,7 +57,7 @@ Here is the list of known and confirmed issues:
...
@@ -57,7 +57,7 @@ Here is the list of known and confirmed issues:
<ul><li>
Tomcat and Glassfish 3 set most static fields (final or non-final) to
<code>
null
</code>
when
<ul><li>
Tomcat and Glassfish 3 set most static fields (final or non-final) to
<code>
null
</code>
when
unloading a web application. This can cause a
<code>
NullPointerException
</code>
in H2 versions
unloading a web application. This can cause a
<code>
NullPointerException
</code>
in H2 versions
1.1.107 and older, and may still not work in newer versions. Please report it if you
1.1.107 and older, and may still not work in newer versions. Please report it if you
run into this issue. In Tomcat
>
= 6.0 this behavior can be disabled by setting the
run into this issue. In Tomcat
>
= 6.0 this behavior can be disabled by setting the
system property
<code>
org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
</code>
,
system property
<code>
org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
</code>
,
however Tomcat may then run out of memory. A known workaround is to
however Tomcat may then run out of memory. A known workaround is to
put the
<code>
h2*.jar
</code>
file in a shared
<code>
lib
</code>
directory
put the
<code>
h2*.jar
</code>
file in a shared
<code>
lib
</code>
directory
...
@@ -208,15 +208,10 @@ or set the system property <a href="../javadoc/org/h2/constant/SysProperties.htm
...
@@ -208,15 +208,10 @@ or set the system property <a href="../javadoc/org/h2/constant/SysProperties.htm
<h3
id=
"slow_open"
>
Why is Opening my Database Slow?
</h3>
<h3
id=
"slow_open"
>
Why is Opening my Database Slow?
</h3>
<p>
<p>
If it takes a long time to open a database, in most cases it was not closed the last time.
To find out what the problem is, use the H2 Console and click on "Test Connection"
This is specially a problem for larger databases.
instead of "Login". After the "Login Successful" appears, click on it (it's a link).
To close a database, close all connections to it before the application ends, or execute
This will list the top stack traces. Then either analyze this yourself, or
the command
<code>
SHUTDOWN
</code>
.
post those stack traces in the Google Group.
The database is also closed when the virtual machine exits normally
by using a shutdown hook. However killing a Java process or calling
<code>
Runtime.halt
</code>
will prevent this.
The reason why opening is slow in this situations is that indexes are re-created.
If you can not guarantee the database is closed, consider using
<a
href=
"grammar.html#set_log"
class=
"notranslate"
>
SET LOG 2
</a>
.
</p>
</p>
<p>
<p>
To find out what the problem is, open the database in embedded mode using the H2 Console.
To find out what the problem is, open the database in embedded mode using the H2 Console.
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
abc0e805
...
@@ -478,7 +478,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
...
@@ -478,7 +478,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
TCP Server: use a nonce (number used once) to protect unencrypted channels against replay attacks.
</li><li>
TCP Server: use a nonce (number used once) to protect unencrypted channels against replay attacks.
</li><li>
Simplify running scripts and recovery: CREATE FORCE USER (overwrites an existing user).
</li><li>
Simplify running scripts and recovery: CREATE FORCE USER (overwrites an existing user).
</li><li>
Support CREATE DATABASE LINK (a custom JDBC driver is already supported).
</li><li>
Support CREATE DATABASE LINK (a custom JDBC driver is already supported).
</li><li>
Isse 163: Allow to create foreign keys on metadata types.
</li><li>
Iss
u
e 163: Allow to create foreign keys on metadata types.
</li><li>
Logback: write a native DBAppender.
</li><li>
Logback: write a native DBAppender.
</li></ul>
</li></ul>
...
...
h2/src/docsrc/javadoc/classes.html
浏览文件 @
abc0e805
...
@@ -74,7 +74,6 @@ org.h2.tools<br />
...
@@ -74,7 +74,6 @@ org.h2.tools<br />
<b>
Interfaces
</b><br
/>
<b>
Interfaces
</b><br
/>
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/CloseListener.html"
target=
"javadoc"
>
CloseListener
</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
/>
...
...
h2/src/main/org/h2/bnf/Bnf.java
浏览文件 @
abc0e805
...
@@ -120,6 +120,12 @@ public class Bnf {
...
@@ -120,6 +120,12 @@ public class Bnf {
addFixedRule
(
"@close_bracket@"
,
RuleFixed
.
CLOSE_BRACKET
);
addFixedRule
(
"@close_bracket@"
,
RuleFixed
.
CLOSE_BRACKET
);
}
}
/**
* Parse the syntax and let the rule call the visitor.
*
* @param visitor the visitor
* @param s the syntax to parse
*/
public
void
visit
(
BnfVisitor
visitor
,
String
s
)
{
public
void
visit
(
BnfVisitor
visitor
,
String
s
)
{
this
.
syntax
=
s
;
this
.
syntax
=
s
;
tokens
=
tokenize
();
tokens
=
tokenize
();
...
@@ -150,7 +156,7 @@ public class Bnf {
...
@@ -150,7 +156,7 @@ public class Bnf {
/**
/**
* Get the rule head for the given title.
* Get the rule head for the given title.
*
*
* @param title
* @param title
the title
* @return the rule head, or null
* @return the rule head, or null
*/
*/
public
RuleHead
getRuleHead
(
String
title
)
{
public
RuleHead
getRuleHead
(
String
title
)
{
...
...
h2/src/main/org/h2/constant/SysProperties.java
浏览文件 @
abc0e805
...
@@ -78,7 +78,7 @@ public class SysProperties {
...
@@ -78,7 +78,7 @@ public class SysProperties {
* alias (I in this case) in ResultSetMetaData.getColumnName() and 'null' in
* alias (I in this case) in ResultSetMetaData.getColumnName() and 'null' in
* getTableName(). If disabled, the real column name (ID in this case) and
* getTableName(). If disabled, the real column name (ID in this case) and
* table name is returned. This setting only affects the default mode.
* table name is returned. This setting only affects the default mode.
* <
p
>
* <
br /
>
* When using different modes, this feature is disabled for compatibility
* When using different modes, this feature is disabled for compatibility
* for all databases except MySQL. For MySQL, it is always enabled.
* for all databases except MySQL. For MySQL, it is always enabled.
*/
*/
...
...
h2/src/main/org/h2/server/web/WebApp.java
浏览文件 @
abc0e805
...
@@ -61,14 +61,42 @@ import org.h2.util.Tool;
...
@@ -61,14 +61,42 @@ import org.h2.util.Tool;
*/
*/
public
class
WebApp
{
public
class
WebApp
{
/**
* The web server.
*/
protected
WebServer
server
;
protected
WebServer
server
;
/**
* The session.
*/
protected
WebSession
session
;
protected
WebSession
session
;
/**
* The session attributes
*/
protected
Properties
attributes
;
protected
Properties
attributes
;
/**
* The mime type of the current response.
*/
protected
String
mimeType
;
protected
String
mimeType
;
/**
* Whether the response can be cached.
*/
protected
boolean
cache
;
protected
boolean
cache
;
/**
* Whether to close the connection.
*/
protected
boolean
stop
;
protected
boolean
stop
;
/**
* The language in the HTTP header.
*/
protected
String
headerLanguage
;
protected
String
headerLanguage
;
protected
Profiler
profiler
;
private
Profiler
profiler
;
WebApp
(
WebServer
server
)
{
WebApp
(
WebServer
server
)
{
this
.
server
=
server
;
this
.
server
=
server
;
...
...
h2/src/main/org/h2/store/DataReader.java
浏览文件 @
abc0e805
...
@@ -95,8 +95,9 @@ public class DataReader {
...
@@ -95,8 +95,9 @@ public class DataReader {
* @return the value
* @return the value
*/
*/
// public int readInt() throws IOException {
// public int readInt() throws IOException {
// return (read() << 24) + ((read() & 0xff) << 16) + ((read() & 0xff) << 8) + (read() & 0xff);
// return (read() << 24) + ((read() & 0xff) << 16) +
// }
// ((read() & 0xff) << 8) + (read() & 0xff);
//}
/**
/**
* Read a long.
* Read a long.
...
...
h2/src/main/org/h2/store/PageOutputStream.java
浏览文件 @
abc0e805
...
@@ -105,6 +105,13 @@ public class PageOutputStream {
...
@@ -105,6 +105,13 @@ public class PageOutputStream {
data
.
initWrite
();
data
.
initWrite
();
}
}
/**
* Write the data.
*
* @param b the buffer
* @param off the offset
* @param len the length
*/
public
void
write
(
byte
[]
b
,
int
off
,
int
len
)
throws
IOException
{
public
void
write
(
byte
[]
b
,
int
off
,
int
len
)
throws
IOException
{
if
(
len
<=
0
)
{
if
(
len
<=
0
)
{
return
;
return
;
...
@@ -145,6 +152,9 @@ public class PageOutputStream {
...
@@ -145,6 +152,9 @@ public class PageOutputStream {
}
}
}
}
/**
* Write all data.
*/
public
void
flush
()
throws
IOException
{
public
void
flush
()
throws
IOException
{
if
(
needFlush
)
{
if
(
needFlush
)
{
storePage
();
storePage
();
...
@@ -152,6 +162,9 @@ public class PageOutputStream {
...
@@ -152,6 +162,9 @@ public class PageOutputStream {
}
}
}
}
/**
* Close the stream.
*/
public
void
close
()
{
public
void
close
()
{
store
=
null
;
store
=
null
;
}
}
...
...
h2/src/main/org/h2/util/Profiler.java
浏览文件 @
abc0e805
...
@@ -8,7 +8,6 @@ package org.h2.util;
...
@@ -8,7 +8,6 @@ package org.h2.util;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.Locale
;
import
java.util.Map
;
import
java.util.Map
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Constants
;
...
@@ -147,15 +146,6 @@ public class Profiler implements Runnable {
...
@@ -147,15 +146,6 @@ public class Profiler implements Runnable {
}
}
}
}
public
static
void
main
(
String
...
args
)
{
Profiler
p
=
new
Profiler
();
p
.
startCollecting
();
org
.
h2
.
Driver
.
load
();
Locale
.
getAvailableLocales
();
p
.
stopCollecting
();
System
.
out
.
println
(
p
.
getTop
(
10
));
}
/**
/**
* Get the top stack traces.
* Get the top stack traces.
*
*
...
...
h2/src/test/org/h2/test/test-1.2.txt
浏览文件 @
abc0e805
--- special grammar and test cases ---------------------------------------------------------------------------------------------
--- special grammar and test cases ---------------------------------------------------------------------------------------------
create table test(id decimal(10, 2) primary key) as select 0;
> ok
select * from test where id = 0.00;
> ID
> ----
> 0.00
> rows: 1
select * from test where id = 0.0;
> ID
> ----
> 0.00
> rows: 1
drop table test;
> ok
select count(*) from (select 1 union (select 2 intersect select 2)) x;
select count(*) from (select 1 union (select 2 intersect select 2)) x;
> COUNT(*)
> COUNT(*)
> --------
> --------
...
...
h2/src/test/org/h2/test/unit/TestDataPage.java
浏览文件 @
abc0e805
...
@@ -17,6 +17,7 @@ import org.h2.store.FileStore;
...
@@ -17,6 +17,7 @@ import org.h2.store.FileStore;
import
org.h2.test.TestBase
;
import
org.h2.test.TestBase
;
import
org.h2.util.SmallLRUCache
;
import
org.h2.util.SmallLRUCache
;
import
org.h2.util.TempFileDeleter
;
import
org.h2.util.TempFileDeleter
;
import
org.h2.value.CompareMode
;
import
org.h2.value.Value
;
import
org.h2.value.Value
;
import
org.h2.value.ValueArray
;
import
org.h2.value.ValueArray
;
import
org.h2.value.ValueBoolean
;
import
org.h2.value.ValueBoolean
;
...
@@ -44,6 +45,7 @@ import org.h2.value.ValueUuid;
...
@@ -44,6 +45,7 @@ import org.h2.value.ValueUuid;
public
class
TestDataPage
extends
TestBase
implements
DataHandler
{
public
class
TestDataPage
extends
TestBase
implements
DataHandler
{
private
boolean
testPerformance
;
private
boolean
testPerformance
;
private
CompareMode
compareMode
=
CompareMode
.
getInstance
(
null
,
0
);
/**
/**
* Run just this test.
* Run just this test.
...
@@ -203,7 +205,7 @@ public class TestDataPage extends TestBase implements DataHandler {
...
@@ -203,7 +205,7 @@ public class TestDataPage extends TestBase implements DataHandler {
data
.
reset
();
data
.
reset
();
Value
v2
=
data
.
readValue
();
Value
v2
=
data
.
readValue
();
assertEquals
(
v
.
getType
(),
v2
.
getType
());
assertEquals
(
v
.
getType
(),
v2
.
getType
());
assert
True
(
v
.
compareEqual
(
v2
));
assert
Equals
(
0
,
v
.
compareTo
(
v2
,
compareMode
));
assertEquals
(
123
,
data
.
readInt
());
assertEquals
(
123
,
data
.
readInt
());
}
}
...
...
h2/src/test/org/h2/test/unit/TestNetUtils.java
浏览文件 @
abc0e805
...
@@ -22,6 +22,7 @@ import org.h2.util.NetUtils;
...
@@ -22,6 +22,7 @@ import org.h2.util.NetUtils;
*/
*/
public
class
TestNetUtils
extends
TestBase
{
public
class
TestNetUtils
extends
TestBase
{
private
static
final
int
WORKER_COUNT
=
10
;
private
static
final
int
PORT
=
9111
;
private
static
final
int
PORT
=
9111
;
/**
/**
...
@@ -34,10 +35,8 @@ public class TestNetUtils extends TestBase {
...
@@ -34,10 +35,8 @@ public class TestNetUtils extends TestBase {
}
}
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
testFrequentConnections
(
false
,
1000
);
testFrequentConnections
(
true
,
100
);
testFrequentConnections
(
false
,
1000
);
testFrequentConnections
(
true
,
100
);
testFrequentConnections
(
true
,
100
);
testFrequentConnections
(
false
,
2000
);
}
}
private
void
testFrequentConnections
(
boolean
ssl
,
int
count
)
throws
Exception
{
private
void
testFrequentConnections
(
boolean
ssl
,
int
count
)
throws
Exception
{
...
@@ -61,7 +60,7 @@ public class TestNetUtils extends TestBase {
...
@@ -61,7 +60,7 @@ public class TestNetUtils extends TestBase {
serverThread
.
start
();
serverThread
.
start
();
try
{
try
{
Set
<
ConnectWorker
>
workers
=
new
HashSet
<
ConnectWorker
>();
Set
<
ConnectWorker
>
workers
=
new
HashSet
<
ConnectWorker
>();
for
(
int
i
=
0
;
i
<
1
;
i
++)
{
for
(
int
i
=
0
;
i
<
WORKER_COUNT
;
i
++)
{
workers
.
add
(
new
ConnectWorker
(
ssl
,
counter
));
workers
.
add
(
new
ConnectWorker
(
ssl
,
counter
));
}
}
// ensure the server is started
// ensure the server is started
...
...
h2/src/test/org/h2/test/unit/TestValueHashMap.java
浏览文件 @
abc0e805
...
@@ -84,7 +84,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
...
@@ -84,7 +84,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
case
2
:
case
2
:
Value
v1
=
map
.
get
(
key
);
Value
v1
=
map
.
get
(
key
);
Value
v2
=
hash
.
get
(
key
);
Value
v2
=
hash
.
get
(
key
);
assertTrue
(
v1
==
null
?
v2
==
null
:
v1
.
compareEqual
(
v2
));
assertTrue
(
v1
==
null
?
v2
==
null
:
v1
.
equals
(
v2
));
break
;
break
;
case
3
:
{
case
3
:
{
ArrayList
<
Value
>
a1
=
map
.
keys
();
ArrayList
<
Value
>
a1
=
map
.
keys
();
...
@@ -93,7 +93,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
...
@@ -93,7 +93,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
Collections
.
sort
(
a1
,
vc
);
Collections
.
sort
(
a1
,
vc
);
Collections
.
sort
(
a2
,
vc
);
Collections
.
sort
(
a2
,
vc
);
for
(
int
j
=
0
;
j
<
a1
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
a1
.
size
();
j
++)
{
assertTrue
(
a1
.
get
(
j
).
compareEqual
(
a2
.
get
(
j
)));
assertTrue
(
a1
.
get
(
j
).
equals
(
a2
.
get
(
j
)));
}
}
break
;
break
;
}
}
...
@@ -104,7 +104,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
...
@@ -104,7 +104,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
Collections
.
sort
(
a1
,
vc
);
Collections
.
sort
(
a1
,
vc
);
Collections
.
sort
(
a2
,
vc
);
Collections
.
sort
(
a2
,
vc
);
for
(
int
j
=
0
;
j
<
a1
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
a1
.
size
();
j
++)
{
assertTrue
(
a1
.
get
(
j
).
compareEqual
(
a2
.
get
(
j
)));
assertTrue
(
a1
.
get
(
j
).
equals
(
a2
.
get
(
j
)));
}
}
break
;
break
;
default
:
default
:
...
...
h2/src/test/org/h2/test/unit/TestValueMemory.java
浏览文件 @
abc0e805
...
@@ -60,11 +60,19 @@ public class TestValueMemory extends TestBase implements DataHandler {
...
@@ -60,11 +60,19 @@ public class TestValueMemory extends TestBase implements DataHandler {
}
}
public
void
test
()
throws
SQLException
{
public
void
test
()
throws
SQLException
{
testCompare
();
for
(
int
i
=
0
;
i
<
Value
.
TYPE_COUNT
;
i
++)
{
for
(
int
i
=
0
;
i
<
Value
.
TYPE_COUNT
;
i
++)
{
testType
(
i
);
testType
(
i
);
}
}
}
}
private
void
testCompare
()
{
ValueDecimal
a
=
ValueDecimal
.
get
(
new
BigDecimal
(
"0.0"
));
ValueDecimal
b
=
ValueDecimal
.
get
(
new
BigDecimal
(
"-0.00"
));
assertTrue
(
a
.
hashCode
()
!=
b
.
hashCode
());
assertFalse
(
a
.
equals
(
b
));
}
private
void
testType
(
int
type
)
throws
SQLException
{
private
void
testType
(
int
type
)
throws
SQLException
{
System
.
gc
();
System
.
gc
();
System
.
gc
();
System
.
gc
();
...
...
h2/src/tools/org/h2/build/doc/BnfRailroad.java
浏览文件 @
abc0e805
...
@@ -84,6 +84,12 @@ public class BnfRailroad implements BnfVisitor {
...
@@ -84,6 +84,12 @@ public class BnfRailroad implements BnfVisitor {
html
=
getHtmlText
(
type
);
html
=
getHtmlText
(
type
);
}
}
/**
* Get the HTML text for the given fixed rule.
*
* @param type the fixed rule type
* @return the HTML text
*/
static
String
getHtmlText
(
int
type
)
{
static
String
getHtmlText
(
int
type
)
{
switch
(
type
)
{
switch
(
type
)
{
case
RuleFixed
.
YMD
:
case
RuleFixed
.
YMD
:
...
...
h2/src/tools/org/h2/build/doc/BnfSyntax.java
浏览文件 @
abc0e805
...
@@ -22,6 +22,13 @@ public class BnfSyntax implements BnfVisitor {
...
@@ -22,6 +22,13 @@ public class BnfSyntax implements BnfVisitor {
private
String
html
;
private
String
html
;
/**
* Get the HTML syntax for the given syntax.
*
* @param bnf the BNF
* @param syntaxLines the syntax
* @return the HTML
*/
public
String
getHtml
(
Bnf
bnf
,
String
syntaxLines
)
{
public
String
getHtml
(
Bnf
bnf
,
String
syntaxLines
)
{
syntaxLines
=
StringUtils
.
replaceAll
(
syntaxLines
,
"\n "
,
"\n"
);
syntaxLines
=
StringUtils
.
replaceAll
(
syntaxLines
,
"\n "
,
"\n"
);
StringTokenizer
tokenizer
=
bnf
.
getTokenizer
(
syntaxLines
);
StringTokenizer
tokenizer
=
bnf
.
getTokenizer
(
syntaxLines
);
...
@@ -40,6 +47,13 @@ public class BnfSyntax implements BnfVisitor {
...
@@ -40,6 +47,13 @@ public class BnfSyntax implements BnfVisitor {
return
s
;
return
s
;
}
}
/**
* Get the HTML link to the given token.
*
* @param bnf the BNF
* @param token the token
* @return the HTML link
*/
String
getLink
(
Bnf
bnf
,
String
token
)
{
String
getLink
(
Bnf
bnf
,
String
token
)
{
RuleHead
found
=
null
;
RuleHead
found
=
null
;
String
key
=
Bnf
.
getRuleMapKey
(
token
);
String
key
=
Bnf
.
getRuleMapKey
(
token
);
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
abc0e805
...
@@ -633,4 +633,5 @@ slowly prefs precedence mat verbose nonce complicate speedup replay
...
@@ -633,4 +633,5 @@ slowly prefs precedence mat verbose nonce complicate speedup replay
profiles superinterfaces conventions brace indentations increments
profiles superinterfaces conventions brace indentations increments
explicitconstructorcall switchstatements members parens alignment declarations
explicitconstructorcall switchstatements members parens alignment declarations
jdt continuation codegen parenthesized tabulation ellipsis imple inits guardian
jdt continuation codegen parenthesized tabulation ellipsis imple inits guardian
postfix
postfix iconified deiconified deactivated activated worker frequent utilities
workers appender recovers
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论