Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
6ea41dcc
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6ea41dcc
编写于
9月 07, 2001
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Patch for jdbc2 ResultSet.java. Looks like performance improvement.
Joseph Shraibman
上级
1834987f
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
20 addition
and
15 deletion
+20
-15
src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
+20
-15
未找到文件。
src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
浏览文件 @
6ea41dcc
...
...
@@ -134,7 +134,6 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
{
//release resources held (memory for tuples)
if
(
rows
!=
null
)
{
rows
.
setSize
(
0
);
rows
=
null
;
}
}
...
...
@@ -710,7 +709,8 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
{
int
i
;
for
(
i
=
0
;
i
<
fields
.
length
;
++
i
)
final
int
flen
=
fields
.
length
;
for
(
i
=
0
;
i
<
flen
;
++
i
)
if
(
fields
[
i
].
getName
().
equalsIgnoreCase
(
columnName
))
return
(
i
+
1
);
throw
new
PSQLException
(
"postgresql.res.colname"
,
columnName
);
...
...
@@ -726,11 +726,13 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
if
(
index
==
0
)
throw
new
SQLException
(
"Cannot move to index of 0"
);
final
int
rows_size
=
rows
.
size
();
//if index<0, count from the end of the result set, but check
//to be sure that it is not beyond the first index
if
(
index
<
0
)
if
(
index
>=-
rows
.
size
()
)
internalIndex
=
rows
.
size
()
+
index
;
if
(
index
>
-
rows_size
)
internalIndex
=
rows_size
+
index
;
else
{
beforeFirst
();
return
false
;
...
...
@@ -739,7 +741,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
//must be the case that index>0,
//find the correct place, assuming that
//the index is not too large
if
(
index
<=
rows
.
size
()
)
if
(
index
<=
rows_size
)
internalIndex
=
index
-
1
;
else
{
afterLast
();
...
...
@@ -753,8 +755,9 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
public
void
afterLast
()
throws
SQLException
{
if
(
rows
.
size
()
>
0
)
current_row
=
rows
.
size
();
final
int
rows_size
=
rows
.
size
();
if
(
rows_size
>
0
)
current_row
=
rows_size
;
}
public
void
beforeFirst
()
throws
SQLException
...
...
@@ -967,7 +970,8 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
public
boolean
isAfterLast
()
throws
SQLException
{
return
(
current_row
>=
rows
.
size
()
&&
rows
.
size
()
>
0
);
final
int
rows_size
=
rows
.
size
();
return
(
current_row
>=
rows_size
&&
rows_size
>
0
);
}
public
boolean
isBeforeFirst
()
throws
SQLException
...
...
@@ -982,14 +986,16 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
public
boolean
isLast
()
throws
SQLException
{
return
(
current_row
==
rows
.
size
()
-
1
&&
rows
.
size
()
>
0
);
final
int
rows_size
=
rows
.
size
();
return
(
current_row
==
rows_size
-
1
&&
rows_size
>
0
);
}
public
boolean
last
()
throws
SQLException
{
if
(
rows
.
size
()
<=
0
)
final
int
rows_size
=
rows
.
size
();
if
(
rows_size
<=
0
)
return
false
;
current_row
=
rows
.
size
()
-
1
;
current_row
=
rows
_size
-
1
;
this_row
=
(
byte
[][])
rows
.
elementAt
(
current_row
);
return
true
;
}
...
...
@@ -1480,4 +1486,3 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录