Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
b78408d6
提交
b78408d6
authored
12月 01, 2007
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
5d1d7a1e
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
70 行增加
和
60 行删除
+70
-60
ant-build.properties
h2/ant-build.properties
+2
-2
build.html
h2/src/docsrc/html/build.html
+1
-1
download.html
h2/src/docsrc/html/download.html
+3
-3
mainWeb.html
h2/src/docsrc/html/mainWeb.html
+5
-5
Call.java
h2/src/main/org/h2/command/dml/Call.java
+3
-1
Constants.java
h2/src/main/org/h2/engine/Constants.java
+2
-2
ExpressionColumn.java
h2/src/main/org/h2/expression/ExpressionColumn.java
+1
-0
Function.java
h2/src/main/org/h2/expression/Function.java
+24
-1
JdbcXAConnection.java
h2/src/main/org/h2/jdbcx/JdbcXAConnection.java
+0
-3
LocalResult.java
h2/src/main/org/h2/result/LocalResult.java
+20
-15
FunctionTable.java
h2/src/main/org/h2/table/FunctionTable.java
+3
-1
ValueResultSet.java
h2/src/main/org/h2/value/ValueResultSet.java
+0
-24
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+1
-1
TestDate.java
h2/src/test/org/h2/test/unit/TestDate.java
+4
-0
dictionary.txt
h2/src/tools/org/h2/tools/doc/dictionary.txt
+1
-1
没有找到文件。
h2/ant-build.properties
浏览文件 @
b78408d6
#Sat
Nov 24 19:01:03
CET 2007
#Sat
Dec 01 09:41:20
CET 2007
javac
=
javac
benchmark.drivers.dir
=
C
\:
/data/java
path.servlet.jar
=
C
\:
/data/classpath/servlet-api.jar
version.name.maven
=
1.0.6
2
version.name.maven
=
1.0.6
3
path.lucene.jar
=
C
\:
/data/classpath/lucene-core-2.2.0.jar
jdk
=
1.4
h2/src/docsrc/html/build.html
浏览文件 @
b78408d6
...
...
@@ -78,7 +78,7 @@ Example:
<
dependency
>
<
groupId
>
com.h2database
<
/groupId
>
<
artifactId
>
h2
<
/artifactId
>
<
version
>
1.0.6
2
<
/version
>
<
version
>
1.0.6
3
<
/version
>
<
/dependency
>
</pre>
<p>
...
...
h2/src/docsrc/html/download.html
浏览文件 @
b78408d6
...
...
@@ -15,10 +15,10 @@ H2 Database Engine
<h1>
Downloads
</h1>
<h3>
Version 1.0.6
2 (2007-11-25
, Current)
</h3>
<h3>
Version 1.0.6
3 (2007-12-02
, Current)
</h3>
<p>
<a
href=
"http://www.h2database.com/h2-setup-2007-1
1-25
.exe"
>
Windows Installer
</a><br
/>
<a
href=
"http://www.h2database.com/h2-2007-1
1-25
.zip"
>
Platform-Independent Zip
</a><br
/>
<a
href=
"http://www.h2database.com/h2-setup-2007-1
2-02
.exe"
>
Windows Installer
</a><br
/>
<a
href=
"http://www.h2database.com/h2-2007-1
2-02
.zip"
>
Platform-Independent Zip
</a><br
/>
</p>
<h3>
Download Mirror
</h3>
...
...
h2/src/docsrc/html/mainWeb.html
浏览文件 @
b78408d6
...
...
@@ -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;"
>
<tr><td
style=
"border: 0px; background-color: #eee;"
colspan=
"2"
>
<h3>
Download
</h3>
Version 1.0.6
2 (2007-11-25
):
Version 1.0.6
3 (2007-12-02
):
</td></tr>
<tr><td
style=
"border: 0px; background-color: #eee;"
>
<a
href=
"http://www.h2database.com/h2-setup-2007-1
1-25
.exe"
><img
border=
"1"
src=
"images/download.png"
alt=
"download"
/></a>
<a
href=
"http://www.h2database.com/h2-setup-2007-1
2-02
.exe"
><img
border=
"1"
src=
"images/download.png"
alt=
"download"
/></a>
</td><td
style=
"vertical-align: middle; border: 0px; background-color: #eee;"
>
<a
href=
"http://www.h2database.com/h2-setup-2007-1
1-25
.exe"
>
Windows Installer (2.8 MB)
</a>
<a
href=
"http://www.h2database.com/h2-setup-2007-1
2-02
.exe"
>
Windows Installer (2.8 MB)
</a>
</td></tr>
<tr><td
style=
"border: 0px; background-color: #eee;"
>
<a
href=
"http://www.h2database.com/h2-2007-1
1-25
.zip"
><img
border=
"1"
src=
"images/download.png"
alt=
"download"
/></a>
<a
href=
"http://www.h2database.com/h2-2007-1
2-02
.zip"
><img
border=
"1"
src=
"images/download.png"
alt=
"download"
/></a>
</td><td
style=
"vertical-align: middle; border: 0px; background-color: #eee;"
>
<a
href=
"http://www.h2database.com/h2-2007-1
1-25
.zip"
>
All platforms (zip, 3.9 MB)
</a>
<a
href=
"http://www.h2database.com/h2-2007-1
2-02
.zip"
>
All platforms (zip, 3.9 MB)
</a>
</td></tr>
<tr><td
style=
"border: 0px; background-color: #eee;"
colspan=
"2"
>
<a
href=
"download.html"
>
All Downloads
</a>
...
...
h2/src/main/org/h2/command/dml/Call.java
浏览文件 @
b78408d6
...
...
@@ -4,6 +4,7 @@
*/
package
org
.
h2
.
command
.
dml
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
org.h2.command.Prepared
;
...
...
@@ -39,7 +40,8 @@ public class Call extends Prepared {
setCurrentRowNumber
(
1
);
Value
v
=
value
.
getValue
(
session
);
if
(
v
.
getType
()
==
Value
.
RESULT_SET
)
{
return
LocalResult
.
read
(
session
,
((
ValueResultSet
)
v
).
getResultSet
(),
maxrows
);
ResultSet
rs
=
((
ValueResultSet
)
v
).
getResultSet
();
return
LocalResult
.
read
(
session
,
rs
,
maxrows
);
}
else
if
(
v
.
getType
()
==
Value
.
ARRAY
)
{
Value
[]
list
=
((
ValueArray
)
v
).
getList
();
ObjectArray
expr
=
new
ObjectArray
();
...
...
h2/src/main/org/h2/engine/Constants.java
浏览文件 @
b78408d6
...
...
@@ -72,8 +72,8 @@ import org.h2.constant.SysProperties;
*/
public
class
Constants
{
public
static
final
int
BUILD_ID
=
6
2
;
private
static
final
String
BUILD
=
"2007-1
1-25
"
;
public
static
final
int
BUILD_ID
=
6
3
;
private
static
final
String
BUILD
=
"2007-1
2-02
"
;
public
static
final
int
VERSION_MAJOR
=
1
;
public
static
final
int
VERSION_MINOR
=
0
;
...
...
h2/src/main/org/h2/expression/ExpressionColumn.java
浏览文件 @
b78408d6
...
...
@@ -6,6 +6,7 @@ package org.h2.expression;
import
java.sql.SQLException
;
import
java.util.HashMap
;
import
org.h2.command.Parser
;
import
org.h2.command.dml.Select
;
import
org.h2.constant.ErrorCode
;
...
...
h2/src/main/org/h2/expression/Function.java
浏览文件 @
b78408d6
...
...
@@ -32,12 +32,14 @@ import org.h2.table.LinkSchema;
import
org.h2.table.TableFilter
;
import
org.h2.tools.CompressTool
;
import
org.h2.tools.Csv
;
import
org.h2.tools.SimpleResultSet
;
import
org.h2.util.MathUtils
;
import
org.h2.util.MemoryUtils
;
import
org.h2.util.ObjectArray
;
import
org.h2.util.ObjectUtils
;
import
org.h2.util.RandomUtils
;
import
org.h2.util.StringUtils
;
import
org.h2.value.DataType
;
import
org.h2.value.Value
;
import
org.h2.value.ValueArray
;
import
org.h2.value.ValueBoolean
;
...
...
@@ -1702,9 +1704,30 @@ public class Function extends Expression implements FunctionCall {
}
}
result
.
done
();
ValueResultSet
vr
=
ValueResultSet
.
get
Copy
(
result
,
Integer
.
MAX_VALUE
);
ValueResultSet
vr
=
ValueResultSet
.
get
(
getSimpleResultSet
(
result
,
Integer
.
MAX_VALUE
)
);
return
vr
;
}
SimpleResultSet
getSimpleResultSet
(
LocalResult
rs
,
int
maxrows
)
throws
SQLException
{
int
columnCount
=
rs
.
getVisibleColumnCount
();
SimpleResultSet
simple
=
new
SimpleResultSet
();
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
String
name
=
rs
.
getColumnName
(
i
);
int
sqlType
=
DataType
.
convertTypeToSQLType
(
rs
.
getColumnType
(
i
));
int
precision
=
MathUtils
.
convertLongToInt
(
rs
.
getColumnPrecision
(
i
));
int
scale
=
rs
.
getColumnScale
(
i
);
simple
.
addColumn
(
name
,
sqlType
,
precision
,
scale
);
}
rs
.
reset
();
for
(
int
i
=
0
;
i
<
maxrows
&&
rs
.
next
();
i
++)
{
Object
[]
list
=
new
Object
[
columnCount
];
for
(
int
j
=
0
;
j
<
columnCount
;
j
++)
{
list
[
j
]
=
rs
.
currentRow
()[
j
].
getObject
();
}
simple
.
addRow
(
list
);
}
return
simple
;
}
public
void
setColumns
(
ObjectArray
columns
)
{
this
.
columnList
=
new
Column
[
columns
.
size
()];
...
...
h2/src/main/org/h2/jdbcx/JdbcXAConnection.java
浏览文件 @
b78408d6
...
...
@@ -463,9 +463,6 @@ implements XAConnection, XAResource, JdbcConnectionListener
if
((
flags
&
XAResource
.
TMSUSPEND
)
!=
0
)
{
buff
.
append
(
"|XAResource.TMSUSPEND"
);
}
if
((
flags
&
XAResource
.
XA_OK
)
!=
0
)
{
buff
.
append
(
"|XAResource.XA_OK"
);
}
if
((
flags
&
XAResource
.
XA_RDONLY
)
!=
0
)
{
buff
.
append
(
"|XAResource.XA_RDONLY"
);
}
...
...
h2/src/main/org/h2/result/LocalResult.java
浏览文件 @
b78408d6
...
...
@@ -40,17 +40,31 @@ public class LocalResult implements ResultInterface {
private
int
diskOffset
;
private
boolean
isUpdateCount
;
private
int
updateCount
;
public
static
LocalResult
read
(
Session
session
,
ResultSet
rs
,
int
maxrows
)
throws
SQLException
{
ResultSetMetaData
meta
=
rs
.
getMetaData
();
ObjectArray
cols
=
getExpressionColumns
(
session
,
rs
);
int
columnCount
=
cols
.
size
();
LocalResult
result
=
new
LocalResult
(
session
,
cols
,
columnCount
);
for
(
int
i
=
0
;
(
maxrows
==
0
||
i
<
maxrows
)
&&
rs
.
next
();
i
++)
{
Value
[]
list
=
new
Value
[
columnCount
];
for
(
int
j
=
0
;
j
<
columnCount
;
j
++)
{
int
type
=
result
.
getColumnType
(
j
);
list
[
j
]
=
DataType
.
readValue
(
session
,
rs
,
j
+
1
,
type
);
}
result
.
addRow
(
list
);
}
result
.
done
();
return
result
;
}
private
static
ObjectArray
getExpressionColumns
(
Session
session
,
ResultSet
rs
)
throws
SQLException
{
ResultSetMetaData
meta
=
rs
.
getMetaData
();
int
columnCount
=
meta
.
getColumnCount
();
ObjectArray
cols
=
new
ObjectArray
();
int
[]
types
=
new
int
[
columnCount
];
ObjectArray
cols
=
new
ObjectArray
(
columnCount
);
Database
db
=
session
==
null
?
null
:
session
.
getDatabase
();
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
String
name
=
meta
.
getColumnLabel
(
i
+
1
);
int
type
=
DataType
.
convertSQLTypeToValueType
(
meta
.
getColumnType
(
i
+
1
));
types
[
i
]
=
type
;
int
precision
=
meta
.
getPrecision
(
i
+
1
);
int
scale
=
meta
.
getScale
(
i
+
1
);
int
displaySize
=
meta
.
getColumnDisplaySize
(
i
+
1
);
...
...
@@ -58,16 +72,7 @@ public class LocalResult implements ResultInterface {
Expression
expr
=
new
ExpressionColumn
(
db
,
col
);
cols
.
add
(
expr
);
}
LocalResult
result
=
new
LocalResult
(
session
,
cols
,
columnCount
);
for
(
int
i
=
0
;
(
maxrows
==
0
||
i
<
maxrows
)
&&
rs
.
next
();
i
++)
{
Value
[]
list
=
new
Value
[
columnCount
];
for
(
int
j
=
0
;
j
<
columnCount
;
j
++)
{
list
[
j
]
=
DataType
.
readValue
(
session
,
rs
,
j
+
1
,
types
[
j
]);
}
result
.
addRow
(
list
);
}
result
.
done
();
return
result
;
return
cols
;
}
public
LocalResult
(
int
updateCount
)
{
...
...
h2/src/main/org/h2/table/FunctionTable.java
浏览文件 @
b78408d6
...
...
@@ -7,6 +7,7 @@ package org.h2.table;
import
java.sql.ResultSet
;
import
java.sql.ResultSetMetaData
;
import
java.sql.SQLException
;
import
org.h2.constant.ErrorCode
;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
...
...
@@ -135,7 +136,8 @@ public class FunctionTable extends Table {
return
new
LocalResult
(
0
);
}
else
{
ValueResultSet
value
=
(
ValueResultSet
)
v
;
return
LocalResult
.
read
(
session
,
value
.
getResultSet
(),
0
);
ResultSet
rs
=
value
.
getResultSet
();
return
LocalResult
.
read
(
session
,
rs
,
0
);
}
}
...
...
h2/src/main/org/h2/value/ValueResultSet.java
浏览文件 @
b78408d6
...
...
@@ -10,9 +10,7 @@ import java.sql.ResultSetMetaData;
import
java.sql.SQLException
;
import
org.h2.message.Message
;
import
org.h2.result.LocalResult
;
import
org.h2.tools.SimpleResultSet
;
import
org.h2.util.MathUtils
;
public
class
ValueResultSet
extends
Value
{
...
...
@@ -27,28 +25,6 @@ public class ValueResultSet extends Value {
return
val
;
}
public
static
ValueResultSet
getCopy
(
LocalResult
rs
,
int
maxrows
)
throws
SQLException
{
int
columnCount
=
rs
.
getVisibleColumnCount
();
SimpleResultSet
simple
=
new
SimpleResultSet
();
ValueResultSet
val
=
new
ValueResultSet
(
simple
);
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
String
name
=
rs
.
getColumnName
(
i
);
int
sqlType
=
DataType
.
convertTypeToSQLType
(
rs
.
getColumnType
(
i
));
int
precision
=
MathUtils
.
convertLongToInt
(
rs
.
getColumnPrecision
(
i
));
int
scale
=
rs
.
getColumnScale
(
i
);
simple
.
addColumn
(
name
,
sqlType
,
precision
,
scale
);
}
rs
.
reset
();
for
(
int
i
=
0
;
i
<
maxrows
&&
rs
.
next
();
i
++)
{
Object
[]
list
=
new
Object
[
columnCount
];
for
(
int
j
=
0
;
j
<
columnCount
;
j
++)
{
list
[
j
]
=
rs
.
currentRow
()[
j
].
getObject
();
}
simple
.
addRow
(
list
);
}
return
val
;
}
public
static
ValueResultSet
getCopy
(
ResultSet
rs
,
int
maxrows
)
throws
SQLException
{
ResultSetMetaData
meta
=
rs
.
getMetaData
();
int
columnCount
=
meta
.
getColumnCount
();
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
b78408d6
...
...
@@ -153,7 +153,7 @@ java org.h2.test.TestAll timer
toString: > the parameters for the prepared statements.
autocomplete only just after meaningful key (ctrl+space, space, bs,
interpunctation,
...)
autocomplete only just after meaningful key (ctrl+space, space, bs, ...)
write more tests for the command line tools
...
...
h2/src/test/org/h2/test/unit/TestDate.java
浏览文件 @
b78408d6
/*
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
test
.
unit
;
import
java.sql.SQLException
;
...
...
h2/src/tools/org/h2/tools/doc/dictionary.txt
浏览文件 @
b78408d6
...
...
@@ -514,5 +514,5 @@ opensource atlassian hhh establish pawel nice italiano ucchino paolo italian pie
uklinux credential crypt kerberos redferni routine reopen tmp configured replicating wraps jre
webtest einstellung redirects endless ran gives replication lxabcdef asf packages replayed jspa
russian backward alexahin vlad ffffffffffff bfff ffffffff webapp undeploy initializer brasil uncached slowing translating uploaded
llc computing oliver road
llc computing oliver road
inaccessible android velasques duplicates eduardo chunk brazilian near langpair xrmd xmkd
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论