Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
b28e03e4
提交
b28e03e4
authored
3月 06, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
f68122a5
全部展开
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
1846 行增加
和
1760 行删除
+1846
-1760
changelog.html
h2/src/docsrc/html/changelog.html
+3
-1
features.html
h2/src/docsrc/html/features.html
+4
-3
links.html
h2/src/docsrc/html/links.html
+6
-0
roadmap.html
h2/src/docsrc/html/roadmap.html
+2
-1
tutorial.html
h2/src/docsrc/html/tutorial.html
+8
-4
_docs_en.utf8.txt
h2/src/docsrc/text/_docs_en.utf8.txt
+598
-577
_docs_ja.utf8.txt
h2/src/docsrc/text/_docs_ja.utf8.txt
+598
-577
_docs_en.properties
h2/src/docsrc/textbase/_docs_en.properties
+586
-579
Session.java
h2/src/main/org/h2/engine/Session.java
+8
-0
JdbcConnection.java
h2/src/main/org/h2/jdbc/JdbcConnection.java
+6
-6
help.csv
h2/src/main/org/h2/res/help.csv
+20
-0
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+5
-10
CheckTextFiles.java
h2/src/tools/org/h2/build/code/CheckTextFiles.java
+1
-1
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
b28e03e4
...
...
@@ -18,7 +18,9 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
-
<ul><li>
Column names could not be named "UNIQUE" (with the quotes).
</li><li>
New system function TRANSACTION_ID() to get the current transaction
identifier for a session.
</li></ul>
<h2>
Version 1.1.108 (2009-02-28)
</h2>
...
...
h2/src/docsrc/html/features.html
浏览文件 @
b28e03e4
...
...
@@ -435,11 +435,12 @@ or on the number of open connections.
<h3>
Mixed Mode
</h3>
<p>
The mixed mode is a combination of the embedded and the remote mode.
The
main application connects to a database
in embedded mode, but also starts
a server so that other applications (running in different virtual machines) can
The
first application that connects to a database does that
in embedded mode, but also starts
a server so that other applications (running in different
processes or
virtual machines) can
concurrently access the same data. The embedded connections are as fast as if
the database is used in just the embedded mode, while the remote
connections are a bit slower.
connections are a bit slower. All clients that want to connect to the database (no matter if
it's an embedded or remote connection) can do so using the exact same database URL.
</p>
<img
src=
"images/connection-mode-mixed.png"
alt=
"The database and the server is running inside the application; another application connects remotely"
/>
...
...
h2/src/docsrc/html/links.html
浏览文件 @
b28e03e4
...
...
@@ -39,6 +39,12 @@ H2Sharp: ADO.NET interface for the H2 database engine</a>
H2 Spatial: spatial functions to H2 database
</a>
<h2>
Blogs
</h2>
<a
href=
"http://blog.flexive.org/2008/12/05/porting-flexive-to-the-h2-database/"
>
Porting Flexive to the H2 Database (2008-12-05)
</a><br
/>
<a
href=
"http://blogs.sun.com/theaquarium/entry/h2_database_with_glassfish"
>
H2 Database with GlassFish (2008-11-24)
</a><br
/>
<a
href=
"http://www.marciowb.net/blog/2008/08/quickly-using-h2-database-with"
>
Using H2 Database with Glassfish and Toplink (2008-08-07)
</a><br
/>
<a
href=
"http://zvikico.typepad.com/problog/2008/04"
>
H2 Database - Performance Tracing (2008-04-30)
</a><br
/>
<a
href=
"http://www.bluedevel.com/blog/?p=12"
>
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
b28e03e4
...
...
@@ -328,7 +328,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>
Javadocs: for each tool, add a copy
&
paste sample in the class level.
</li><li>
Javadocs: add @author tags.
</li><li>
Fluent API for tools: Server.createTcpServer().setPort(9081).setPassword(password).start();
</li><li>
MySQL compatibility: real SQL statement
s for SHOW TABLES, DESCRIBE TEST (then remove from Shell)
</li><li>
MySQL compatibility: real SQL statement
for DESCRIBE TEST
</li><li>
Use a default delay of 1 second before closing a database.
</li><li>
Maven: upload source code and javadocs as well.
</li><li>
Write (log) to system table before adding to internal data structures.
...
...
@@ -406,6 +406,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>
Support PostgreSQL lock modes: http://www.postgresql.org/docs/8.3/static/explicit-locking.html
</li><li>
PostgreSQL compatibility: test DbVisualizer and Squirrel SQL using a new PostgreSQL JDBC driver.
</li><li>
RunScript should be able to read from system in (or quite mode for Shell).
</li><li>
Natural join: support select x from dual natural join dual.
</li></ul>
<h2>
Not Planned
</h2>
...
...
h2/src/docsrc/html/tutorial.html
浏览文件 @
b28e03e4
...
...
@@ -432,12 +432,16 @@ add the following snippet to your web.xml file (after context-param and before f
<
/listener>
</pre>
<p>
For details on how to access the database, see the code DbStarter.java
For details on how to access the database, see the file DbStarter.java.
By default the DbStarter listener opens an embedded connection using the database URL jdbc:h2:~/test
and user name and password 'sa'. If you want to use it within your servlet, you can access it like this:
</p>
<pre>
Connection conn = getServletContext().getAttribute("connection");
</pre>
<p>
By default the DbStarter listener opens an embedded connection using the database URL jdbc:h2:~/test
and user name and password 'sa'. It can also start the TCP server, however this is disabled by default.
To enable it, use the db.tcpServer parameter in web.xml. Here is the complete list of options.
The DbStarter can also start the TCP server, however this is disabled by default.
To enable it, use the parameter db.tcpServer in the file web.xml. Here is the complete list of options.
These options are set just after the display-name and description tag, but before any listener and filter tags:
</p>
<pre>
...
...
h2/src/docsrc/text/_docs_en.utf8.txt
浏览文件 @
b28e03e4
差异被折叠。
点击展开。
h2/src/docsrc/text/_docs_ja.utf8.txt
浏览文件 @
b28e03e4
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_docs_en.properties
浏览文件 @
b28e03e4
差异被折叠。
点击展开。
h2/src/main/org/h2/engine/Session.java
浏览文件 @
b28e03e4
...
...
@@ -40,6 +40,7 @@ import org.h2.value.Value;
import
org.h2.value.ValueLob
;
import
org.h2.value.ValueLong
;
import
org.h2.value.ValueNull
;
import
org.h2.value.ValueString
;
/**
* A session represents an embedded database connection. When using the server
...
...
@@ -1127,4 +1128,11 @@ public class Session extends SessionWithState {
connectionInfo
=
ci
;
}
public
Value
getTransactionId
()
{
if
(
undoLog
.
size
()
==
0
||
!
database
.
isPersistent
())
{
return
ValueNull
.
INSTANCE
;
}
return
ValueString
.
get
(
firstUncommittedLog
+
"-"
+
firstUncommittedPos
+
"-"
+
id
);
}
}
h2/src/main/org/h2/jdbc/JdbcConnection.java
浏览文件 @
b28e03e4
...
...
@@ -1496,14 +1496,14 @@ public class JdbcConnection extends TraceObject implements Connection {
## Java 1.6 end ##*/
/**
* Create a
c
lob value from this reader.
* Create a
C
lob value from this reader.
*
* @param x the reader
* @param length the length (if smaller or equal t
o
0, all data until the
* @param length the length (if smaller or equal t
han
0, all data until the
* end of file is read)
* @return the value
*/
Value
createClob
(
Reader
x
,
long
length
)
throws
SQLException
{
public
Value
createClob
(
Reader
x
,
long
length
)
throws
SQLException
{
if
(
x
==
null
)
{
return
ValueNull
.
INSTANCE
;
}
...
...
@@ -1515,14 +1515,14 @@ public class JdbcConnection extends TraceObject implements Connection {
}
/**
* Create a
b
lob value from this input stream.
* Create a
B
lob value from this input stream.
*
* @param x the input stream
* @param length the length (if smaller or equal t
o
0, all data until the
* @param length the length (if smaller or equal t
han
0, all data until the
* end of file is read)
* @return the value
*/
Value
createBlob
(
InputStream
x
,
long
length
)
throws
SQLException
{
public
Value
createBlob
(
InputStream
x
,
long
length
)
throws
SQLException
{
if
(
x
==
null
)
{
return
ValueNull
.
INSTANCE
;
}
...
...
h2/src/main/org/h2/res/help.csv
浏览文件 @
b28e03e4
...
...
@@ -127,6 +127,15 @@ The password must be in single quotes. It is case sensitive and can contain spac
SCRIPT NODATA
"
"Commands (DML)","SHOW","
SHOW { SCHEMAS | TABLES [FROM schemaName] |
COLUMNS FROM tableName [FROM schemaName] }
","
Lists the schemas, tables, or the columns of a table.
","
SHOW TABLES
"
"Commands (DDL)","ALTER INDEX RENAME","
ALTER INDEX indexName RENAME TO newIndexName
","
...
...
@@ -3073,6 +3082,17 @@ Returns the result set. TABLE_DISTINCT removes duplicate rows.
SELECT * FROM TABLE(ID INT=(1, 2), NAME VARCHAR=('Hello', 'World'))
"
"Functions (System)","TRANSACTION_ID","
TRANSACTION_ID(): string
","
Returns the current transaction id for this session. This method returns NULL
if there is no uncommitted change, or if the the database is not persisted.
Otherwise a value of the following form is returned: logFileId-position-sessionId.
The value is unique across database restarts (values are not re-used).
","
CALL TRANSACTION_ID()
"
"Functions (System)","USER","
{USER | CURRENT_USER}(): string
","
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
b28e03e4
...
...
@@ -283,19 +283,11 @@ java org.h2.test.TestAll timer
/*
select 1 from dual a where 1 in(select 1 from dual b
where 1 in(select 1 from dual c where a.x=1));
mark 1.1 as stable
http://www.marciowb.net/blog/2008/08/quickly-using-h2-database-with
http://blogs.sun.com/theaquarium/entry/h2_database_with_glassfish
http://blog.flexive.org/2008/12/05/porting-flexive-to-the-h2-database/
documentation: start rolling review; consistently use <code> or not.
test performance with log=2
maybe make log=2 the default option
TRANSACTION_ID()
use 127.0.0.1 if other addresses don't work
...
...
@@ -303,7 +295,10 @@ select for update in mvcc mode: only lock the selected records?
JCR: for each node type, create a table; one 'dynamic' table with parameter;
option to cache the results
Favicon per page
<link rel="icon" type="image/png" href="/path/image.png">
create a short 4 pages documentation
postgresql generate_series?
...
...
h2/src/tools/org/h2/build/code/CheckTextFiles.java
浏览文件 @
b28e03e4
...
...
@@ -150,7 +150,7 @@ public class CheckTextFiles {
for
(
int
i
=
0
;
i
<
data
.
length
;
i
++)
{
char
ch
=
(
char
)
(
data
[
i
]
&
0xff
);
if
(
ch
>
127
)
{
fail
(
file
,
"contains character "
+
ch
,
line
);
fail
(
file
,
"contains character "
+
(
int
)
ch
+
" at "
+
new
String
(
data
,
i
-
10
,
20
)
,
line
);
return
;
}
else
if
(
ch
<
32
)
{
if
(
ch
==
'\n'
)
{
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
b28e03e4
...
...
@@ -582,4 +582,4 @@ bot jot delicious rife appenders circles spelling cash sky ecm nuxeo poland
opengeospatial sfs symmetric obsolete failing parenthesis unloading refreshed
grails reloading slightly accepting deploying conflicting recovered counters
versus extracts squirrel misdirected rle looking arc addressed european
soerensen
soerensen
favicon glass restarts flexive fish
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论