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,22 +18,24 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
The BNF parser now uses the visitor pattern.
</li><li>
The methods of the CloseListener are added to the Trigger interface.
<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.
The interface CloseListener is removed.
</li><li>
Converting a UUID to bytes was incorrect. Because of that, updatable result sets on
tables with UUID primary key did not work.
tables with UUID primary key did not work.
</li><li>
The database URL property DATABASE_EVENT_LISTENER_OBJECT is no longer supported
(there are problems passing objects when the PostgreSQL driver is installed as well).
</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>
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)
so it can't be confused with run().
</li><li>
Tools: the method run(String... args) has been renamed to runTool(String... args).
</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 RECOVER has currently no effect.
</li><li>
Converting an old (non-page store) database is no longer supported using this version.
</li><li>
Converting an old (non-page store) database is no longer supported using this version.
</li><li>
The system property "h2.overflowExceptions" is no longer supported.
</li><li>
The system property "h2.optimizeDropDependencies" is no longer supported.
</li><li>
The system property "h2.optimizeGroupSorted" is no longer supported.
...
...
@@ -43,9 +45,9 @@ Change Log
</li><li>
The system property "h2.optimizeInJoin" is no longer supported.
</li><li>
The system properties "h2.reuseSpace..." are no longer supported.
</li><li>
The setting LOG has currently no effect.
</li><li>
Disabling the page store is no longer supported. The old storage mechanism
has been removed, shrinking the jar file size by about 5%. Older databases can still be opened
(the database will be converted automatically).
</li><li>
Disabling the page store is no longer supported. The old storage mechanism
has been removed, shrinking the jar file size by about 5%. Older databases can still be opened
(the database will be converted automatically).
</li><li>
The translated resources are now stored in UTF-8 format.
</li><li>
The Windows service wrapper now detects if multiple versions of H2 are installed.
</li></ul>
...
...
h2/src/docsrc/html/faq.html
浏览文件 @
abc0e805
...
...
@@ -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
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
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>
,
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
...
...
@@ -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>
<p>
If it takes a long time to open a database, in most cases it was not closed the last time.
This is specially a problem for larger databases.
To close a database, close all connections to it before the application ends, or execute
the command
<code>
SHUTDOWN
</code>
.
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>
.
To find out what the problem is, use the H2 Console and click on "Test Connection"
instead of "Login". After the "Login Successful" appears, click on it (it's a link).
This will list the top stack traces. Then either analyze this yourself, or
post those stack traces in the Google Group.
</p>
<p>
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>.
</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>
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></ul>
...
...
h2/src/docsrc/javadoc/classes.html
浏览文件 @
abc0e805
...
...
@@ -74,7 +74,6 @@ org.h2.tools<br />
<b>
Interfaces
</b><br
/>
org.h2.api
<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/Trigger.html"
target=
"javadoc"
>
Trigger
</a><br
/>
<br
/>
...
...
h2/src/main/org/h2/bnf/Bnf.java
浏览文件 @
abc0e805
...
...
@@ -120,6 +120,12 @@ public class Bnf {
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
)
{
this
.
syntax
=
s
;
tokens
=
tokenize
();
...
...
@@ -150,7 +156,7 @@ public class Bnf {
/**
* Get the rule head for the given title.
*
* @param title
* @param title
the title
* @return the rule head, or null
*/
public
RuleHead
getRuleHead
(
String
title
)
{
...
...
h2/src/main/org/h2/constant/SysProperties.java
浏览文件 @
abc0e805
...
...
@@ -78,7 +78,7 @@ public class SysProperties {
* alias (I in this case) in ResultSetMetaData.getColumnName() and 'null' in
* getTableName(). If disabled, the real column name (ID in this case) and
* table name is returned. This setting only affects the default mode.
* <
p
>
* <
br /
>
* When using different modes, this feature is disabled for compatibility
* 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;
*/
public
class
WebApp
{
/**
* The web server.
*/
protected
WebServer
server
;
/**
* The session.
*/
protected
WebSession
session
;
/**
* The session attributes
*/
protected
Properties
attributes
;
/**
* The mime type of the current response.
*/
protected
String
mimeType
;
/**
* Whether the response can be cached.
*/
protected
boolean
cache
;
/**
* Whether to close the connection.
*/
protected
boolean
stop
;
/**
* The language in the HTTP header.
*/
protected
String
headerLanguage
;
protected
Profiler
profiler
;
private
Profiler
profiler
;
WebApp
(
WebServer
server
)
{
this
.
server
=
server
;
...
...
h2/src/main/org/h2/store/DataReader.java
浏览文件 @
abc0e805
...
...
@@ -95,8 +95,9 @@ public class DataReader {
* @return the value
*/
// 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.
...
...
h2/src/main/org/h2/store/PageOutputStream.java
浏览文件 @
abc0e805
...
...
@@ -105,6 +105,13 @@ public class PageOutputStream {
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
{
if
(
len
<=
0
)
{
return
;
...
...
@@ -145,6 +152,9 @@ public class PageOutputStream {
}
}
/**
* Write all data.
*/
public
void
flush
()
throws
IOException
{
if
(
needFlush
)
{
storePage
();
...
...
@@ -152,6 +162,9 @@ public class PageOutputStream {
}
}
/**
* Close the stream.
*/
public
void
close
()
{
store
=
null
;
}
...
...
h2/src/main/org/h2/util/Profiler.java
浏览文件 @
abc0e805
...
...
@@ -8,7 +8,6 @@ package org.h2.util;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Locale
;
import
java.util.Map
;
import
org.h2.engine.Constants
;
...
...
@@ -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.
*
...
...
h2/src/test/org/h2/test/test-1.2.txt
浏览文件 @
abc0e805
--- 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;
> COUNT(*)
> --------
...
...
h2/src/test/org/h2/test/unit/TestDataPage.java
浏览文件 @
abc0e805
...
...
@@ -17,6 +17,7 @@ import org.h2.store.FileStore;
import
org.h2.test.TestBase
;
import
org.h2.util.SmallLRUCache
;
import
org.h2.util.TempFileDeleter
;
import
org.h2.value.CompareMode
;
import
org.h2.value.Value
;
import
org.h2.value.ValueArray
;
import
org.h2.value.ValueBoolean
;
...
...
@@ -44,6 +45,7 @@ import org.h2.value.ValueUuid;
public
class
TestDataPage
extends
TestBase
implements
DataHandler
{
private
boolean
testPerformance
;
private
CompareMode
compareMode
=
CompareMode
.
getInstance
(
null
,
0
);
/**
* Run just this test.
...
...
@@ -203,7 +205,7 @@ public class TestDataPage extends TestBase implements DataHandler {
data
.
reset
();
Value
v2
=
data
.
readValue
();
assertEquals
(
v
.
getType
(),
v2
.
getType
());
assert
True
(
v
.
compareEqual
(
v2
));
assert
Equals
(
0
,
v
.
compareTo
(
v2
,
compareMode
));
assertEquals
(
123
,
data
.
readInt
());
}
...
...
h2/src/test/org/h2/test/unit/TestNetUtils.java
浏览文件 @
abc0e805
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: Sergi Vladykin
*/
package
org
.
h2
.
test
.
unit
;
import
java.io.IOException
;
import
java.net.ServerSocket
;
import
java.net.Socket
;
import
java.util.HashSet
;
import
java.util.Set
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.h2.test.TestBase
;
import
org.h2.util.NetUtils
;
/**
* Test the network utilities.
*
* @author Sergi Vladykin
*/
public
class
TestNetUtils
extends
TestBase
{
private
static
final
int
PORT
=
9111
;
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
Exception
{
testFrequentConnections
(
false
,
1000
);
testFrequentConnections
(
true
,
100
);
testFrequentConnections
(
false
,
1000
);
testFrequentConnections
(
true
,
100
);
}
private
void
testFrequentConnections
(
boolean
ssl
,
int
count
)
throws
Exception
{
final
ServerSocket
serverSocket
=
NetUtils
.
createServerSocket
(
PORT
,
ssl
);
final
AtomicInteger
counter
=
new
AtomicInteger
(
count
);
Thread
serverThread
=
new
Thread
()
{
public
void
run
()
{
while
(!
isInterrupted
())
{
try
{
Socket
socket
=
serverSocket
.
accept
();
// System.out.println("opened " + counter);
socket
.
close
();
}
catch
(
Exception
e
)
{
// ignore
}
}
// System.out.println("stopped ");
}
};
serverThread
.
start
();
try
{
Set
<
ConnectWorker
>
workers
=
new
HashSet
<
ConnectWorker
>();
for
(
int
i
=
0
;
i
<
1
;
i
++)
{
workers
.
add
(
new
ConnectWorker
(
ssl
,
counter
));
}
// ensure the server is started
Thread
.
sleep
(
100
);
for
(
ConnectWorker
worker
:
workers
)
{
worker
.
start
();
}
for
(
ConnectWorker
worker
:
workers
)
{
worker
.
join
();
Exception
e
=
worker
.
getException
();
if
(
e
!=
null
)
{
e
.
printStackTrace
();
}
}
}
finally
{
try
{
serverSocket
.
close
();
}
catch
(
Exception
e
)
{
// ignore
}
serverThread
.
interrupt
();
serverThread
.
join
();
}
}
/**
* A worker thread to test connecting.
*/
private
class
ConnectWorker
extends
Thread
{
private
final
boolean
ssl
;
private
final
AtomicInteger
counter
;
private
Exception
exception
;
public
ConnectWorker
(
boolean
ssl
,
AtomicInteger
counter
)
{
this
.
ssl
=
ssl
;
this
.
counter
=
counter
;
}
public
void
run
()
{
try
{
while
(!
isInterrupted
()
&&
counter
.
decrementAndGet
()
>
0
)
{
Socket
socket
=
NetUtils
.
createLoopbackSocket
(
PORT
,
ssl
);
try
{
socket
.
close
();
}
catch
(
IOException
e
)
{
// ignore
}
}
}
catch
(
Exception
e
)
{
exception
=
new
Exception
(
"count: "
+
counter
,
e
);
}
}
public
Exception
getException
()
{
return
exception
;
}
}
}
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: Sergi Vladykin
*/
package
org
.
h2
.
test
.
unit
;
import
java.io.IOException
;
import
java.net.ServerSocket
;
import
java.net.Socket
;
import
java.util.HashSet
;
import
java.util.Set
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.h2.test.TestBase
;
import
org.h2.util.NetUtils
;
/**
* Test the network utilities.
*
* @author Sergi Vladykin
*/
public
class
TestNetUtils
extends
TestBase
{
private
static
final
int
WORKER_COUNT
=
10
;
private
static
final
int
PORT
=
9111
;
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
Exception
{
testFrequentConnections
(
true
,
100
);
testFrequentConnections
(
false
,
2000
);
}
private
void
testFrequentConnections
(
boolean
ssl
,
int
count
)
throws
Exception
{
final
ServerSocket
serverSocket
=
NetUtils
.
createServerSocket
(
PORT
,
ssl
);
final
AtomicInteger
counter
=
new
AtomicInteger
(
count
);
Thread
serverThread
=
new
Thread
()
{
public
void
run
()
{
while
(!
isInterrupted
())
{
try
{
Socket
socket
=
serverSocket
.
accept
();
// System.out.println("opened " + counter);
socket
.
close
();
}
catch
(
Exception
e
)
{
// ignore
}
}
// System.out.println("stopped ");
}
};
serverThread
.
start
();
try
{
Set
<
ConnectWorker
>
workers
=
new
HashSet
<
ConnectWorker
>();
for
(
int
i
=
0
;
i
<
WORKER_COUNT
;
i
++)
{
workers
.
add
(
new
ConnectWorker
(
ssl
,
counter
));
}
// ensure the server is started
Thread
.
sleep
(
100
);
for
(
ConnectWorker
worker
:
workers
)
{
worker
.
start
();
}
for
(
ConnectWorker
worker
:
workers
)
{
worker
.
join
();
Exception
e
=
worker
.
getException
();
if
(
e
!=
null
)
{
e
.
printStackTrace
();
}
}
}
finally
{
try
{
serverSocket
.
close
();
}
catch
(
Exception
e
)
{
// ignore
}
serverThread
.
interrupt
();
serverThread
.
join
();
}
}
/**
* A worker thread to test connecting.
*/
private
class
ConnectWorker
extends
Thread
{
private
final
boolean
ssl
;
private
final
AtomicInteger
counter
;
private
Exception
exception
;
public
ConnectWorker
(
boolean
ssl
,
AtomicInteger
counter
)
{
this
.
ssl
=
ssl
;
this
.
counter
=
counter
;
}
public
void
run
()
{
try
{
while
(!
isInterrupted
()
&&
counter
.
decrementAndGet
()
>
0
)
{
Socket
socket
=
NetUtils
.
createLoopbackSocket
(
PORT
,
ssl
);
try
{
socket
.
close
();
}
catch
(
IOException
e
)
{
// ignore
}
}
}
catch
(
Exception
e
)
{
exception
=
new
Exception
(
"count: "
+
counter
,
e
);
}
}
public
Exception
getException
()
{
return
exception
;
}
}
}
h2/src/test/org/h2/test/unit/TestValueHashMap.java
浏览文件 @
abc0e805
...
...
@@ -84,7 +84,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
case
2
:
Value
v1
=
map
.
get
(
key
);
Value
v2
=
hash
.
get
(
key
);
assertTrue
(
v1
==
null
?
v2
==
null
:
v1
.
compareEqual
(
v2
));
assertTrue
(
v1
==
null
?
v2
==
null
:
v1
.
equals
(
v2
));
break
;
case
3
:
{
ArrayList
<
Value
>
a1
=
map
.
keys
();
...
...
@@ -93,7 +93,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
Collections
.
sort
(
a1
,
vc
);
Collections
.
sort
(
a2
,
vc
);
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
;
}
...
...
@@ -104,7 +104,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
Collections
.
sort
(
a1
,
vc
);
Collections
.
sort
(
a2
,
vc
);
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
;
default
:
...
...
h2/src/test/org/h2/test/unit/TestValueMemory.java
浏览文件 @
abc0e805
...
...
@@ -60,11 +60,19 @@ public class TestValueMemory extends TestBase implements DataHandler {
}
public
void
test
()
throws
SQLException
{
testCompare
();
for
(
int
i
=
0
;
i
<
Value
.
TYPE_COUNT
;
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
{
System
.
gc
();
System
.
gc
();
...
...
h2/src/tools/org/h2/build/doc/BnfRailroad.java
浏览文件 @
abc0e805
...
...
@@ -84,6 +84,12 @@ public class BnfRailroad implements BnfVisitor {
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
)
{
switch
(
type
)
{
case
RuleFixed
.
YMD
:
...
...
h2/src/tools/org/h2/build/doc/BnfSyntax.java
浏览文件 @
abc0e805
...
...
@@ -22,6 +22,13 @@ public class BnfSyntax implements BnfVisitor {
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
)
{
syntaxLines
=
StringUtils
.
replaceAll
(
syntaxLines
,
"\n "
,
"\n"
);
StringTokenizer
tokenizer
=
bnf
.
getTokenizer
(
syntaxLines
);
...
...
@@ -40,6 +47,13 @@ public class BnfSyntax implements BnfVisitor {
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
)
{
RuleHead
found
=
null
;
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
profiles superinterfaces conventions brace indentations increments
explicitconstructorcall switchstatements members parens alignment declarations
jdt continuation codegen parenthesized tabulation ellipsis imple inits guardian
postfix
postfix iconified deiconified deactivated activated worker frequent utilities
workers appender recovers
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论