Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
b731e1ed
提交
b731e1ed
authored
8月 13, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Small performance optimization
上级
07ad5271
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
9 行增加
和
12 行删除
+9
-12
Prepared.java
h2/src/main/org/h2/command/Prepared.java
+5
-1
Delete.java
h2/src/main/org/h2/command/dml/Delete.java
+4
-2
Insert.java
h2/src/main/org/h2/command/dml/Insert.java
+0
-2
Merge.java
h2/src/main/org/h2/command/dml/Merge.java
+0
-1
Select.java
h2/src/main/org/h2/command/dml/Select.java
+0
-4
Update.java
h2/src/main/org/h2/command/dml/Update.java
+0
-2
没有找到文件。
h2/src/main/org/h2/command/Prepared.java
浏览文件 @
b731e1ed
...
...
@@ -58,6 +58,7 @@ public abstract class Prepared {
private
Command
command
;
private
int
objectId
;
private
int
currentRowNumber
;
private
int
rowScanCount
;
/**
* Create a new object.
...
...
@@ -343,7 +344,10 @@ public abstract class Prepared {
*
* @param rowNumber the row number
*/
protected
void
setCurrentRowNumber
(
int
rowNumber
)
{
protected
void
setCurrentRowNumber
(
int
rowNumber
)
throws
SQLException
{
if
((
rowScanCount
++
&
127
)
==
0
)
{
checkCanceled
();
}
this
.
currentRowNumber
=
rowNumber
;
}
...
...
h2/src/main/org/h2/command/dml/Delete.java
浏览文件 @
b731e1ed
...
...
@@ -53,7 +53,6 @@ public class Delete extends Prepared {
try
{
setCurrentRowNumber
(
0
);
while
(
tableFilter
.
next
())
{
checkCanceled
();
setCurrentRowNumber
(
rows
.
size
()
+
1
);
if
(
condition
==
null
||
Boolean
.
TRUE
.
equals
(
condition
.
getBooleanValue
(
session
)))
{
Row
row
=
tableFilter
.
get
();
...
...
@@ -63,8 +62,11 @@ public class Delete extends Prepared {
rows
.
add
(
row
);
}
}
int
rowScanCount
=
0
;
for
(
rows
.
reset
();
rows
.
hasNext
();)
{
if
((
rowScanCount
++
&
127
)
==
0
)
{
checkCanceled
();
}
Row
row
=
rows
.
next
();
table
.
removeRow
(
session
,
row
);
session
.
log
(
table
,
UndoLogRecord
.
DELETE
,
row
);
...
...
h2/src/main/org/h2/command/dml/Insert.java
浏览文件 @
b731e1ed
...
...
@@ -93,7 +93,6 @@ public class Insert extends Prepared {
}
}
}
checkCanceled
();
table
.
fireBefore
(
session
);
table
.
validateConvertUpdateSequence
(
session
,
newRow
);
table
.
fireBeforeRow
(
session
,
null
,
newRow
);
...
...
@@ -110,7 +109,6 @@ public class Insert extends Prepared {
table
.
fireBefore
(
session
);
table
.
lock
(
session
,
true
,
false
);
while
(
rows
.
next
())
{
checkCanceled
();
count
++;
Value
[]
r
=
rows
.
currentRow
();
Row
newRow
=
table
.
getTemplateRow
();
...
...
h2/src/main/org/h2/command/dml/Merge.java
浏览文件 @
b731e1ed
...
...
@@ -132,7 +132,6 @@ public class Merge extends Prepared {
table
.
fireBefore
(
session
);
table
.
lock
(
session
,
true
,
false
);
while
(
rows
.
next
())
{
checkCanceled
();
count
++;
Value
[]
r
=
rows
.
currentRow
();
Row
newRow
=
table
.
getTemplateRow
();
...
...
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
b731e1ed
...
...
@@ -155,7 +155,6 @@ public class Select extends Query {
setCurrentRowNumber
(
0
);
Value
[]
previousKeyValues
=
null
;
while
(
topTableFilter
.
next
())
{
checkCanceled
();
setCurrentRowNumber
(
rowNumber
+
1
);
if
(
condition
==
null
||
Boolean
.
TRUE
.
equals
(
condition
.
getBooleanValue
(
session
)))
{
rowNumber
++;
...
...
@@ -306,7 +305,6 @@ public class Select extends Query {
setCurrentRowNumber
(
0
);
ValueArray
defaultGroup
=
ValueArray
.
get
(
new
Value
[
0
]);
while
(
topTableFilter
.
next
())
{
checkCanceled
();
setCurrentRowNumber
(
rowNumber
+
1
);
if
(
condition
==
null
||
Boolean
.
TRUE
.
equals
(
condition
.
getBooleanValue
(
session
)))
{
Value
key
;
...
...
@@ -457,7 +455,6 @@ public class Select extends Query {
SearchRow
first
=
null
;
int
columnIndex
=
index
.
getColumns
()[
0
].
getColumnId
();
while
(
true
)
{
checkCanceled
();
setCurrentRowNumber
(
rowNumber
+
1
);
Cursor
cursor
=
index
.
findNext
(
session
,
first
,
null
);
if
(!
cursor
.
next
())
{
...
...
@@ -491,7 +488,6 @@ public class Select extends Query {
int
rowNumber
=
0
;
setCurrentRowNumber
(
0
);
while
(
topTableFilter
.
next
())
{
checkCanceled
();
setCurrentRowNumber
(
rowNumber
+
1
);
if
(
condition
==
null
||
Boolean
.
TRUE
.
equals
(
condition
.
getBooleanValue
(
session
)))
{
Value
[]
row
=
new
Value
[
columnCount
];
...
...
h2/src/main/org/h2/command/dml/Update.java
浏览文件 @
b731e1ed
...
...
@@ -85,7 +85,6 @@ public class Update extends Prepared {
setCurrentRowNumber
(
0
);
int
count
=
0
;
while
(
tableFilter
.
next
())
{
checkCanceled
();
setCurrentRowNumber
(
count
+
1
);
if
(
condition
==
null
||
Boolean
.
TRUE
.
equals
(
condition
.
getBooleanValue
(
session
)))
{
Row
oldRow
=
tableFilter
.
get
();
...
...
@@ -133,7 +132,6 @@ public class Update extends Prepared {
if
(
table
.
fireRow
())
{
rows
.
invalidateCache
();
for
(
rows
.
reset
();
rows
.
hasNext
();)
{
checkCanceled
();
Row
o
=
rows
.
next
();
Row
n
=
rows
.
next
();
table
.
fireAfterRow
(
session
,
o
,
n
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论