Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
b4fb5f79
提交
b4fb5f79
authored
7月 13, 2018
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Split and rename getters of subexpressions
上级
e647b73b
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
51 行增加
和
30 行删除
+51
-30
Query.java
h2/src/main/org/h2/command/dml/Query.java
+7
-7
Comparison.java
h2/src/main/org/h2/expression/Comparison.java
+13
-6
ConditionAndOr.java
h2/src/main/org/h2/expression/ConditionAndOr.java
+13
-6
ConditionNot.java
h2/src/main/org/h2/expression/ConditionNot.java
+1
-1
Operation.java
h2/src/main/org/h2/expression/Operation.java
+13
-6
FullText.java
h2/src/main/org/h2/fulltext/FullText.java
+4
-4
没有找到文件。
h2/src/main/org/h2/command/dml/Query.java
浏览文件 @
b4fb5f79
...
...
@@ -525,22 +525,22 @@ public abstract class Query extends Prepared {
}
if
(
expr
instanceof
Operation
)
{
Operation
operation
=
(
Operation
)
expr
;
Expression
right
=
operation
.
get
Expression
(
false
);
return
checkOrderOther
(
session
,
operation
.
get
Expression
(
true
),
expressionSQL
)
Expression
right
=
operation
.
get
RightSubExpression
(
);
return
checkOrderOther
(
session
,
operation
.
get
LeftSubExpression
(
),
expressionSQL
)
&&
(
right
==
null
||
checkOrderOther
(
session
,
right
,
expressionSQL
));
}
if
(
expr
instanceof
ConditionAndOr
)
{
ConditionAndOr
condition
=
(
ConditionAndOr
)
expr
;
return
checkOrderOther
(
session
,
condition
.
get
Expression
(
true
),
expressionSQL
)
&&
checkOrderOther
(
session
,
condition
.
get
Expression
(
false
),
expressionSQL
);
return
checkOrderOther
(
session
,
condition
.
get
LeftSubExpression
(
),
expressionSQL
)
&&
checkOrderOther
(
session
,
condition
.
get
RightSubExpression
(
),
expressionSQL
);
}
if
(
expr
instanceof
ConditionNot
)
{
return
checkOrderOther
(
session
,
((
ConditionNot
)
expr
).
getCondition
(),
expressionSQL
);
return
checkOrderOther
(
session
,
((
ConditionNot
)
expr
).
get
Sub
Condition
(),
expressionSQL
);
}
if
(
expr
instanceof
Comparison
)
{
Comparison
condition
=
(
Comparison
)
expr
;
return
checkOrderOther
(
session
,
condition
.
get
Expression
(
true
),
expressionSQL
)
&&
checkOrderOther
(
session
,
condition
.
get
Expression
(
false
),
expressionSQL
);
return
checkOrderOther
(
session
,
condition
.
get
LeftSubExpression
(
),
expressionSQL
)
&&
checkOrderOther
(
session
,
condition
.
get
RightSubExpression
(
),
expressionSQL
);
}
return
false
;
}
...
...
h2/src/main/org/h2/expression/Comparison.java
浏览文件 @
b4fb5f79
...
...
@@ -597,14 +597,21 @@ public class Comparison extends Condition {
}
/**
* Get the left
or the right
sub-expression of this condition.
* Get the left sub-expression of this condition.
*
* @param getLeft true to get the left sub-expression, false to get the
* right sub-expression.
* @return the sub-expression
* @return the left sub-expression
*/
public
Expression
getExpression
(
boolean
getLeft
)
{
return
getLeft
?
this
.
left
:
right
;
public
Expression
getLeftSubExpression
()
{
return
left
;
}
/**
* Get the right sub-expression of this condition.
*
* @return the right sub-expression
*/
public
Expression
getRightSubExpression
()
{
return
right
;
}
}
h2/src/main/org/h2/expression/ConditionAndOr.java
浏览文件 @
b4fb5f79
...
...
@@ -284,14 +284,21 @@ public class ConditionAndOr extends Condition {
}
/**
* Get the left
or the right
sub-expression of this condition.
* Get the left sub-expression of this condition.
*
* @param getLeft true to get the left sub-expression, false to get the
* right sub-expression.
* @return the sub-expression
* @return the left sub-expression
*/
public
Expression
getExpression
(
boolean
getLeft
)
{
return
getLeft
?
this
.
left
:
right
;
public
Expression
getLeftSubExpression
()
{
return
left
;
}
/**
* Get the right sub-expression of this condition.
*
* @return the right sub-expression
*/
public
Expression
getRightSubExpression
()
{
return
right
;
}
}
h2/src/main/org/h2/expression/ConditionNot.java
浏览文件 @
b4fb5f79
...
...
@@ -103,7 +103,7 @@ public class ConditionNot extends Condition {
*
* @return the sub-expression
*/
public
Expression
getCondition
()
{
public
Expression
get
Sub
Condition
()
{
return
condition
;
}
...
...
h2/src/main/org/h2/expression/Operation.java
浏览文件 @
b4fb5f79
...
...
@@ -408,14 +408,21 @@ public class Operation extends Expression {
}
/**
* Get the left
or the right sub-expression of this condi
tion.
* Get the left
sub-expression of this opera
tion.
*
* @param getLeft true to get the left sub-expression, false to get the
* right sub-expression.
* @return the sub-expression
* @return the left sub-expression
*/
public
Expression
getExpression
(
boolean
getLeft
)
{
return
getLeft
?
this
.
left
:
right
;
public
Expression
getLeftSubExpression
()
{
return
left
;
}
/**
* Get the right sub-expression of this operation.
*
* @return the right sub-expression
*/
public
Expression
getRightSubExpression
()
{
return
right
;
}
}
h2/src/main/org/h2/fulltext/FullText.java
浏览文件 @
b4fb5f79
...
...
@@ -669,14 +669,14 @@ public class FullText {
ArrayList
<
String
>
data
,
Expression
expr
)
{
if
(
expr
instanceof
ConditionAndOr
)
{
ConditionAndOr
and
=
(
ConditionAndOr
)
expr
;
Expression
left
=
and
.
get
Expression
(
true
);
Expression
right
=
and
.
get
Expression
(
false
);
Expression
left
=
and
.
get
LeftSubExpression
(
);
Expression
right
=
and
.
get
RightSubExpression
(
);
addColumnData
(
columns
,
data
,
left
);
addColumnData
(
columns
,
data
,
right
);
}
else
{
Comparison
comp
=
(
Comparison
)
expr
;
ExpressionColumn
ec
=
(
ExpressionColumn
)
comp
.
get
Expression
(
true
);
ValueExpression
ev
=
(
ValueExpression
)
comp
.
get
Expression
(
false
);
ExpressionColumn
ec
=
(
ExpressionColumn
)
comp
.
get
LeftSubExpression
(
);
ValueExpression
ev
=
(
ValueExpression
)
comp
.
get
RightSubExpression
(
);
String
columnName
=
ec
.
getColumnName
();
columns
.
add
(
columnName
);
if
(
ev
==
null
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论