Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
c0354f2a
提交
c0354f2a
authored
8月 15, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
3c46ac75
全部展开
显示空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
1558 行增加
和
1461 行删除
+1558
-1461
build.html
h2/src/docsrc/html/build.html
+14
-6
features.html
h2/src/docsrc/html/features.html
+4
-2
roadmap.html
h2/src/docsrc/html/roadmap.html
+1
-1
_docs_en.utf8.txt
h2/src/docsrc/text/_docs_en.utf8.txt
+498
-474
_docs_ja.utf8.txt
h2/src/docsrc/text/_docs_ja.utf8.txt
+513
-489
_docs_en.properties
h2/src/docsrc/textbase/_docs_en.properties
+481
-473
_messages_en.properties
h2/src/docsrc/textbase/_messages_en.properties
+1
-0
Prepared.java
h2/src/main/org/h2/command/Prepared.java
+9
-1
ErrorCode.java
h2/src/main/org/h2/constant/ErrorCode.java
+13
-2
FunctionAlias.java
h2/src/main/org/h2/engine/FunctionAlias.java
+4
-3
SessionRemote.java
h2/src/main/org/h2/engine/SessionRemote.java
+8
-6
_messages_de.properties
h2/src/main/org/h2/res/_messages_de.properties
+1
-0
_messages_en.properties
h2/src/main/org/h2/res/_messages_en.properties
+1
-0
_messages_ja.properties
h2/src/main/org/h2/res/_messages_ja.properties
+1
-0
_messages_pl.properties
h2/src/main/org/h2/res/_messages_pl.properties
+1
-0
_messages_pt_br.properties
h2/src/main/org/h2/res/_messages_pt_br.properties
+1
-0
help.csv
h2/src/main/org/h2/res/help.csv
+2
-1
TcpServer.java
h2/src/main/org/h2/server/TcpServer.java
+1
-1
PgServer.java
h2/src/main/org/h2/server/pg/PgServer.java
+1
-1
ValueLob.java
h2/src/main/org/h2/value/ValueLob.java
+1
-0
Build.java
h2/src/tools/org/h2/build/Build.java
+2
-1
没有找到文件。
h2/src/docsrc/html/build.html
浏览文件 @
c0354f2a
...
...
@@ -20,6 +20,8 @@ Build
Environment
</a><br
/>
<a
href=
"#building"
>
Building the Software
</a><br
/>
<a
href=
"#build_targets"
>
Build Targets
</a><br
/>
<a
href=
"#maven2"
>
Using Maven 2
</a><br
/>
<a
href=
"#translating"
>
...
...
@@ -57,7 +59,7 @@ Newer version or compatible software works too.
<br
/><a
name=
"building"
></a>
<h2>
Building the Software
</h2>
<p>
On the command line, go to the directory
src
and execute the following command:
On the command line, go to the directory
h2
and execute the following command:
</p>
<pre>
build -?
...
...
@@ -68,16 +70,22 @@ You will get a list of targets. If you want to build the jar file, execute:
<pre>
build jar
</pre>
<br
/><a
name=
"build_targets"
></a>
<h2>
Build Targets
</h2>
<p>
The build system can generate smaller jar files as well. The following targets are currently supported:
</p>
<ul><li>
jarClient: Create the h2client.jar. This only contains the remote JDBC implementation.
</li><li>
jarSmall: Create the file h2small.jar. This only contains the embedded database. Debug information is disabled.
</li><li>
jarJaqu: Create the file h2jaqu.jar. This only contains the JaQu (Java Query) implementation. All other jar files do not include JaQu.
</li></ul>
<p>
To create a jar file with the JDBC API and the classes required to connect to a server only,
use the target jarClient:
To create the h2client.jar file, go to the directory h2 and execute the following command:
</p>
<pre>
build jarClient
</pre>
<p>
The other targets may be used as well.
</p>
<br
/><a
name=
"maven2"
></a>
<h2>
Using Maven 2
</h2>
...
...
h2/src/docsrc/html/features.html
浏览文件 @
c0354f2a
...
...
@@ -408,7 +408,7 @@ or on the number of open connections.
<h3>
Remote Mode
</h3>
<p>
When using the remote mode (sometimes called client/server mode), an application opens a
When using the remote mode (sometimes called
server mode or
client/server mode), an application opens a
database remotely using the JDBC or ODBC API. A server needs to be started within the same
or another virtual machine (or on another computer).
Many applications can connect to the same database at the same time.
...
...
@@ -426,7 +426,9 @@ or on the number of open connections.
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
concurrently access the same data.
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.
</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/roadmap.html
浏览文件 @
c0354f2a
...
...
@@ -169,6 +169,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>
ROW_NUMBER (not the same as ROWNUM)
</li><li>
Partial indexing (see PostgreSQL)
</li><li>
The build should fail if the test fails
</li><li>
Add GUI to build a custom version (embedded, fulltext,...) using build flags
</li><li>
http://rubyforge.org/projects/hypersonic/
</li><li>
DbVisualizer profile for H2
</li><li>
Add comparator (x === y) : (x = y or (x is null and y is null))
...
...
@@ -226,7 +227,6 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>
Dynamic length numbers / special methods for DataPage.writeByte / writeShort / Ronni Nielsen
</li><li>
Pluggable ThreadPool, (AvalonDB / deebee / Paul Hammant)
</li><li>
Recursive Queries (see details)
</li><li>
Add GUI to build a custom version (embedded, fulltext,...)
</li><li>
Release locks (shared or exclusive) on demand
</li><li>
Support OUTER UNION
</li><li>
Support Parameterized Views (similar to CSVREAD, but using just SQL for the definition)
...
...
h2/src/docsrc/text/_docs_en.utf8.txt
浏览文件 @
c0354f2a
差异被折叠。
点击展开。
h2/src/docsrc/text/_docs_ja.utf8.txt
浏览文件 @
c0354f2a
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_docs_en.properties
浏览文件 @
c0354f2a
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_messages_en.properties
浏览文件 @
c0354f2a
...
...
@@ -160,6 +160,7 @@
90136
=
Unsupported outer join condition
\:
{0}
90137
=
Can only assign to a variable, not to
\:
{0}
90138
=
Invalid database name
\:
{0}
90139
=
The public static Java method was not found
\:
{0}
HY000
=
General error
\:
{0}
HY004
=
Unknown data type
\:
{0}
HYC00
=
Feature not supported
...
...
h2/src/main/org/h2/command/Prepared.java
浏览文件 @
c0354f2a
...
...
@@ -320,7 +320,15 @@ public abstract class Prepared {
Expression
e
=
(
Expression
)
parameters
.
get
(
i
);
Value
v
=
e
.
getValue
(
session
);
try
{
buff
.
append
(
v
.
getSQL
());
// if (v.getPrecision() > SysProperties.MAX_TRACE_DATA_LENGTH) {
//
// }
String
s
=
v
.
getSQL
();
int
test
;
// if (s.length() > SysProperties.MAX_TRACE_DATA_LENGTH) {
// s = s.substring(0, SysProperties.MAX_TRACE_DATA_LENGTH) + " /* len: " + s.length() + " */";
// }
buff
.
append
(
s
);
}
catch
(
Exception
t
)
{
buff
.
append
(
"? /*"
);
buff
.
append
(
StringUtils
.
quoteJavaString
(
t
.
getMessage
()));
...
...
h2/src/main/org/h2/constant/ErrorCode.java
浏览文件 @
c0354f2a
...
...
@@ -1281,7 +1281,8 @@ public class ErrorCode {
* the specified method was not found in the class.
* Example:
* <pre>
* CREATE ALIAS TEST FOR "java.lang.Math.test";
* CREATE ALIAS TO_BINARY FOR "java.lang.Long.toBinaryString(long)";
* CALL TO_BINARY(10, 2);
* </pre>
*/
public
static
final
int
METHOD_NOT_FOUND_1
=
90087
;
...
...
@@ -1838,7 +1839,17 @@ public class ErrorCode {
*/
public
static
final
int
INVALID_DATABASE_NAME_1
=
90138
;
// next is 90139
/**
* The error with code <code>90139</code> is thrown when
* the specified public static Java method was not found in the class.
* Example:
* <pre>
* CREATE ALIAS TEST FOR "java.lang.Math.test";
* </pre>
*/
public
static
final
int
PUBLIC_STATIC_JAVA_METHOD_NOT_FOUND_1
=
90139
;
// next is 90140
private
ErrorCode
()
{
// utility class
...
...
h2/src/main/org/h2/engine/FunctionAlias.java
浏览文件 @
c0354f2a
...
...
@@ -84,7 +84,7 @@ public class FunctionAlias extends DbObjectBase {
}
}
if
(
list
.
size
()
==
0
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
METHOD_NOT_FOUND_1
,
methodName
+
" ("
+
className
+
")"
);
throw
Message
.
getSQLException
(
ErrorCode
.
PUBLIC_STATIC_JAVA_
METHOD_NOT_FOUND_1
,
methodName
+
" ("
+
className
+
")"
);
}
javaMethods
=
new
JavaMethod
[
list
.
size
()];
list
.
toArray
(
javaMethods
);
...
...
@@ -153,12 +153,13 @@ public class FunctionAlias extends DbObjectBase {
*/
public
JavaMethod
findJavaMethod
(
Expression
[]
args
)
throws
SQLException
{
load
();
int
parameterCount
=
args
.
length
;
for
(
int
i
=
0
;
i
<
javaMethods
.
length
;
i
++)
{
if
(
javaMethods
[
i
].
getParameterCount
()
==
args
.
length
)
{
if
(
javaMethods
[
i
].
getParameterCount
()
==
parameterCount
)
{
return
javaMethods
[
i
];
}
}
throw
Message
.
getSQLException
(
ErrorCode
.
METHOD_NOT_FOUND_1
,
methodName
+
" ("
+
className
+
")"
);
throw
Message
.
getSQLException
(
ErrorCode
.
METHOD_NOT_FOUND_1
,
methodName
+
" ("
+
className
+
"
, parameter count: "
+
parameterCount
+
"
)"
);
}
public
String
getJavaClassName
()
{
...
...
h2/src/main/org/h2/engine/SessionRemote.java
浏览文件 @
c0354f2a
...
...
@@ -185,12 +185,11 @@ public class SessionRemote implements SessionInterface, DataHandler {
}
}
private
String
getTraceFilePrefix
(
String
dbName
)
{
String
dir
=
SysProperties
.
CLIENT_TRACE_DIRECTORY
;
private
String
getFilePrefix
(
String
dir
)
{
StringBuffer
buff
=
new
StringBuffer
();
buff
.
append
(
dir
);
for
(
int
i
=
0
;
i
<
d
b
Name
.
length
();
i
++)
{
char
ch
=
d
b
Name
.
charAt
(
i
);
for
(
int
i
=
0
;
i
<
d
atabase
Name
.
length
();
i
++)
{
char
ch
=
d
atabase
Name
.
charAt
(
i
);
if
(
Character
.
isLetterOrDigit
(
ch
))
{
buff
.
append
(
ch
);
}
else
{
...
...
@@ -229,7 +228,7 @@ public class SessionRemote implements SessionInterface, DataHandler {
String
traceLevelFile
=
ci
.
getProperty
(
SetTypes
.
TRACE_LEVEL_FILE
,
null
);
if
(
traceLevelFile
!=
null
)
{
int
level
=
Integer
.
parseInt
(
traceLevelFile
);
String
prefix
=
get
TraceFilePrefix
(
databaseName
);
String
prefix
=
get
FilePrefix
(
SysProperties
.
CLIENT_TRACE_DIRECTORY
);
String
file
=
FileUtils
.
createTempFile
(
prefix
,
Constants
.
SUFFIX_TRACE_FILE
,
false
,
false
);
traceSystem
.
setFileName
(
file
);
traceSystem
.
setLevelFile
(
level
);
...
...
@@ -454,7 +453,10 @@ public class SessionRemote implements SessionInterface, DataHandler {
public
String
createTempFile
()
throws
SQLException
{
try
{
return
FileUtils
.
createTempFile
(
databaseName
,
Constants
.
SUFFIX_TEMP_FILE
,
true
,
false
);
String
prefix
=
getFilePrefix
(
System
.
getProperty
(
"java.io.tmpdir"
));
int
test
;
// return FileUtils.createTempFile(databaseName, Constants.SUFFIX_TEMP_FILE, true, false);
return
FileUtils
.
createTempFile
(
prefix
,
Constants
.
SUFFIX_TEMP_FILE
,
true
,
false
);
}
catch
(
IOException
e
)
{
throw
Message
.
convertIOException
(
e
,
databaseName
);
}
...
...
h2/src/main/org/h2/res/_messages_de.properties
浏览文件 @
c0354f2a
...
...
@@ -160,6 +160,7 @@
90136
=
Diese Outer Join Bedingung wird nicht unterst
\u
00FCtzt
\:
{0}
90137
=
Werte k
\u
00F6nnen nur einer Variablen zugewiesen werden, nicht an
\:
{0}
90138
=
Ung
\u
00FCltiger Datenbank Name
\:
{0}
90139
=
Die (public static) Java Funktion wurde nicht gefunden
\:
{0}
HY000
=
Allgemeiner Fehler
\:
{0}
HY004
=
Unbekannter Datentyp
\:
{0}
HYC00
=
Dieses Feature wird unterst
\u
00FCtzt
...
...
h2/src/main/org/h2/res/_messages_en.properties
浏览文件 @
c0354f2a
...
...
@@ -160,6 +160,7 @@
90136
=
Unsupported outer join condition
\:
{0}
90137
=
Can only assign to a variable, not to
\:
{0}
90138
=
Invalid database name
\:
{0}
90139
=
The public static Java method was not found
\:
{0}
HY000
=
General error
\:
{0}
HY004
=
Unknown data type
\:
{0}
HYC00
=
Feature not supported
...
...
h2/src/main/org/h2/res/_messages_ja.properties
浏览文件 @
c0354f2a
...
...
@@ -160,6 +160,7 @@
90136
=
\u
672A
\u
30B5
\u
30DD
\u
30FC
\u
30C8
\u
306E
\u5916\u
90E8
\u
7D50
\u5408\u6761\u
4EF6
\:
{0}
90137
=
\u5272\u
308A
\u
5F53
\u3066\u
306F
\u5909\u6570\u
306B
\u
306E
\u
307F
\u
53EF
\u
80FD
\u3067\u3059\u3002
{0}
\u
306B
\u
306F
\u3067\u
304D
\u
307E
\u
305B
\u3093
90138
=
\#
Invalid database name
\:
{0}
90139
=
\#
The public static Java method was not found
\:
{0}
HY000
=
\u
4E00
\u
822C
\u
30A8
\u
30E9
\u
30FC
\:
{0}
HY004
=
\u
4E0D
\u
660E
\u
306A
\u
30C7
\u
30FC
\u
30BF
\u
578B
\:
{0}
HYC00
=
\u
6A5F
\u
80FD
\u
306F
\u
30B5
\u
30DD
\u
30FC
\u
30C8
\u3055\u
308C
\u3066\u3044\u
307E
\u
305B
\u3093
...
...
h2/src/main/org/h2/res/_messages_pl.properties
浏览文件 @
c0354f2a
...
...
@@ -160,6 +160,7 @@
90136
=
\#
Unsupported outer join condition
\:
{0}
90137
=
\#
Can only assign to a variable, not to
\:
{0}
90138
=
\#
Invalid database name
\:
{0}
90139
=
\#
The public static Java method was not found
\:
{0}
HY000
=
Blad ogolny
\:
{0}
HY004
=
Nieznany typ danyche
\:
{0}
HYC00
=
Cecha nie jest wspierana
...
...
h2/src/main/org/h2/res/_messages_pt_br.properties
浏览文件 @
c0354f2a
...
...
@@ -160,6 +160,7 @@
90136
=
\#
Unsupported outer join condition
\:
{0}
90137
=
\#
Can only assign to a variable, not to
\:
{0}
90138
=
\#
Invalid database name
\:
{0}
90139
=
\#
The public static Java method was not found
\:
{0}
HY000
=
Erro geral
\:
{0}
HY004
=
Tipo de dados desconhecido
\:
{0}
HYC00
=
Recurso n
\u
00E3o suportado
...
...
h2/src/main/org/h2/res/help.csv
浏览文件 @
c0354f2a
...
...
@@ -358,7 +358,8 @@ CREATE AGGREGATE MEDIAN FOR ""com.acme.db.Median""
CREATE ALIAS [IF NOT EXISTS] newFunctionAliasName FOR classAndMethodName
","
Creates a new function alias. The method name must be the full qualified class and method name,
and may optionally include the parameter classes as in ""java.lang.Integer.parseInt(java.lang.String, int)"")
and may optionally include the parameter classes as in ""java.lang.Integer.parseInt(java.lang.String, int)"").
The class and the method must both be public, and the method must be static.
Admin rights are required to execute this command.
If the first parameter of the Java function is a java.sql.Connection, then
the current to the database is provided. This connection must not be closed.
...
...
h2/src/main/org/h2/server/TcpServer.java
浏览文件 @
c0354f2a
...
...
@@ -150,7 +150,7 @@ public class TcpServer implements Service {
public
void
init
(
String
[]
args
)
{
port
=
DEFAULT_PORT
;
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
for
(
int
i
=
0
;
args
!=
null
&&
i
<
args
.
length
;
i
++)
{
String
a
=
args
[
i
];
if
(
"-trace"
.
equals
(
a
))
{
trace
=
true
;
...
...
h2/src/main/org/h2/server/pg/PgServer.java
浏览文件 @
c0354f2a
...
...
@@ -49,7 +49,7 @@ public class PgServer implements Service {
public
void
init
(
String
[]
args
)
{
port
=
DEFAULT_PORT
;
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
for
(
int
i
=
0
;
args
!=
null
&&
i
<
args
.
length
;
i
++)
{
String
a
=
args
[
i
];
if
(
"-trace"
.
equals
(
a
))
{
trace
=
true
;
...
...
h2/src/main/org/h2/value/ValueLob.java
浏览文件 @
c0354f2a
...
...
@@ -654,6 +654,7 @@ public class ValueLob extends Value {
}
public
String
toString
()
{
int
tst
;
if
(
small
==
null
)
{
return
getClass
().
getName
()
+
" file: "
+
fileName
+
" type: "
+
type
+
" precision: "
+
precision
;
}
...
...
h2/src/tools/org/h2/build/Build.java
浏览文件 @
c0354f2a
...
...
@@ -238,6 +238,7 @@ public class Build extends BuildBase {
/**
* Create the file h2small.jar. This only contains the embedded database.
* Debug information is disabled.
*/
public
void
jarSmall
()
{
compile
(
false
,
false
);
...
...
@@ -259,7 +260,7 @@ public class Build extends BuildBase {
/**
* Create the file h2jaqu.jar. This only contains the JaQu (Java Query)
* implementation.
* implementation.
All other jar files do not include JaQu.
*/
public
void
jarJaqu
()
{
compile
(
true
,
false
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论