Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
6f8a82af
提交
6f8a82af
authored
10月 07, 2018
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix ValueResultSet support in Transfer
上级
72497459
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
37 行增加
和
9 行删除
+37
-9
release.txt
h2/src/installer/release.txt
+3
-0
Constants.java
h2/src/main/org/h2/engine/Constants.java
+7
-1
Transfer.java
h2/src/main/org/h2/value/Transfer.java
+20
-7
ValueResultSet.java
h2/src/main/org/h2/value/ValueResultSet.java
+2
-1
TestSpatial.java
h2/src/test/org/h2/test/db/TestSpatial.java
+5
-0
没有找到文件。
h2/src/installer/release.txt
浏览文件 @
6f8a82af
...
...
@@ -56,6 +56,9 @@ Update org.h2.engine.Constants.java:
set BUILD_DATE to today
increment BUILD_ID
Update org.h2.value.Transfer.java:
if the last TCP_PROTOCOL_VERSION_## doesn't have a release date set it to current BUILD_DATE
Update changelog.html:
* create a new "Next Version (unreleased)" with an empty list
* add a new version
...
...
h2/src/main/org/h2/engine/Constants.java
浏览文件 @
6f8a82af
...
...
@@ -105,6 +105,12 @@ public class Constants {
*/
public
static
final
int
TCP_PROTOCOL_VERSION_17
=
17
;
/**
* The TCP protocol version number 18.
* @since 1.4.198 (TODO)
*/
public
static
final
int
TCP_PROTOCOL_VERSION_18
=
18
;
/**
* Minimum supported version of TCP protocol.
*/
...
...
@@ -113,7 +119,7 @@ public class Constants {
/**
* Maximum supported version of TCP protocol.
*/
public
static
final
int
TCP_PROTOCOL_VERSION_MAX_SUPPORTED
=
TCP_PROTOCOL_VERSION_1
7
;
public
static
final
int
TCP_PROTOCOL_VERSION_MAX_SUPPORTED
=
TCP_PROTOCOL_VERSION_1
8
;
/**
* The major version of this database.
...
...
h2/src/main/org/h2/value/Transfer.java
浏览文件 @
6f8a82af
...
...
@@ -481,10 +481,19 @@ public class Transfer {
int
columnCount
=
result
.
getVisibleColumnCount
();
writeInt
(
columnCount
);
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
writeString
(
result
.
getColumnName
(
i
));
writeInt
(
result
.
getColumnType
(
i
));
writeInt
(
MathUtils
.
convertLongToInt
(
result
.
getColumnPrecision
(
i
)));
writeInt
(
result
.
getColumnScale
(
i
));
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_18
)
{
writeString
(
result
.
getAlias
(
i
));
writeString
(
result
.
getColumnName
(
i
));
writeInt
(
result
.
getColumnType
(
i
));
writeLong
(
result
.
getColumnPrecision
(
i
));
writeInt
(
result
.
getColumnScale
(
i
));
writeInt
(
result
.
getDisplaySize
(
i
));
}
else
{
writeString
(
result
.
getColumnName
(
i
));
writeInt
(
DataType
.
getDataType
(
result
.
getColumnType
(
i
)).
sqlType
);
writeInt
(
MathUtils
.
convertLongToInt
(
result
.
getColumnPrecision
(
i
)));
writeInt
(
result
.
getColumnScale
(
i
));
}
}
while
(
result
.
next
())
{
writeBoolean
(
true
);
...
...
@@ -677,9 +686,13 @@ public class Transfer {
SimpleResult
rs
=
new
SimpleResult
();
int
columns
=
readInt
();
for
(
int
i
=
0
;
i
<
columns
;
i
++)
{
String
name
=
readString
();
rs
.
addColumn
(
name
,
name
,
DataType
.
convertSQLTypeToValueType
(
readInt
()),
readInt
(),
readInt
(),
Integer
.
MAX_VALUE
);
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_18
)
{
rs
.
addColumn
(
readString
(),
readString
(),
readInt
(),
readLong
(),
readInt
(),
readInt
());
}
else
{
String
name
=
readString
();
rs
.
addColumn
(
name
,
name
,
DataType
.
convertSQLTypeToValueType
(
readInt
()),
readInt
(),
readInt
(),
Integer
.
MAX_VALUE
);
}
}
while
(
readBoolean
())
{
Value
[]
o
=
new
Value
[
columns
];
...
...
h2/src/main/org/h2/value/ValueResultSet.java
浏览文件 @
6f8a82af
...
...
@@ -53,7 +53,8 @@ public class ValueResultSet extends Value {
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
String
alias
=
meta
.
getColumnLabel
(
i
+
1
);
String
name
=
meta
.
getColumnName
(
i
+
1
);
int
columnType
=
DataType
.
convertSQLTypeToValueType
(
meta
.
getColumnType
(
i
+
1
));
int
columnType
=
DataType
.
convertSQLTypeToValueType
(
meta
.
getColumnType
(
i
+
1
),
meta
.
getColumnTypeName
(
i
+
1
));
int
precision
=
meta
.
getPrecision
(
i
+
1
);
int
scale
=
meta
.
getScale
(
i
+
1
);
int
displaySize
=
meta
.
getColumnDisplaySize
(
i
+
1
);
...
...
h2/src/test/org/h2/test/db/TestSpatial.java
浏览文件 @
6f8a82af
...
...
@@ -717,6 +717,11 @@ public class TestSpatial extends TestDb {
assertEquals
(
"geometry"
,
columnMeta
.
getString
(
"TYPE_NAME"
).
toLowerCase
());
assertFalse
(
columnMeta
.
next
());
ResultSet
rs
=
stat
.
executeQuery
(
"select point_table(1, 1)"
);
assertTrue
(
rs
.
next
());
ResultSet
rs2
=
(
ResultSet
)
rs
.
getObject
(
1
);
assertEquals
(
"GEOMETRY"
,
rs2
.
getMetaData
().
getColumnTypeName
(
1
));
}
deleteDb
(
"spatial"
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论