Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
b4d4c796
Unverified
提交
b4d4c796
authored
2月 24, 2018
作者:
Noel Grandin
提交者:
GitHub
2月 24, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #904 from katzyn/join
Remove unused parameters from readJoin() and readTableFilter()
上级
801913db
371783fa
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
16 行增加
和
17 行删除
+16
-17
Parser.java
h2/src/main/org/h2/command/Parser.java
+16
-17
没有找到文件。
h2/src/main/org/h2/command/Parser.java
浏览文件 @
b4d4c796
...
...
@@ -1348,7 +1348,7 @@ public class Parser {
return
command
;
}
private
TableFilter
readTableFilter
(
boolean
fromOuter
)
{
private
TableFilter
readTableFilter
()
{
Table
table
;
String
alias
=
null
;
if
(
readIf
(
"("
))
{
...
...
@@ -1368,8 +1368,8 @@ public class Parser {
query
,
currentSelect
);
}
else
{
TableFilter
top
;
top
=
readTableFilter
(
false
);
top
=
readJoin
(
top
,
currentSelect
,
false
,
false
);
top
=
readTableFilter
();
top
=
readJoin
(
top
,
false
);
top
=
getNested
(
top
);
read
(
")"
);
alias
=
readFromAlias
(
null
);
...
...
@@ -1717,8 +1717,7 @@ public class Parser {
return
command
;
}
private
TableFilter
readJoin
(
TableFilter
top
,
Select
command
,
boolean
nested
,
boolean
fromOuter
)
{
private
TableFilter
readJoin
(
TableFilter
top
,
boolean
nested
)
{
boolean
joined
=
false
;
TableFilter
last
=
top
;
while
(
true
)
{
...
...
@@ -1727,8 +1726,8 @@ public class Parser {
readIf
(
"OUTER"
);
read
(
"JOIN"
);
// the right hand side is the 'inner' table usually
join
=
readTableFilter
(
fromOuter
);
join
=
readJoin
(
join
,
command
,
nested
,
true
);
join
=
readTableFilter
();
join
=
readJoin
(
join
,
nested
);
Expression
on
=
null
;
if
(
readIf
(
"ON"
))
{
on
=
readExpression
();
...
...
@@ -1739,8 +1738,8 @@ public class Parser {
}
else
if
(
readIf
(
"LEFT"
))
{
readIf
(
"OUTER"
);
read
(
"JOIN"
);
join
=
readTableFilter
(
true
);
join
=
readJoin
(
join
,
command
,
true
,
true
);
join
=
readTableFilter
();
join
=
readJoin
(
join
,
true
);
Expression
on
=
null
;
if
(
readIf
(
"ON"
))
{
on
=
readExpression
();
...
...
@@ -1750,16 +1749,16 @@ public class Parser {
throw
getSyntaxError
();
}
else
if
(
readIf
(
"INNER"
))
{
read
(
"JOIN"
);
join
=
readTableFilter
(
fromOuter
);
top
=
readJoin
(
top
,
command
,
false
,
false
);
join
=
readTableFilter
();
top
=
readJoin
(
top
,
false
);
Expression
on
=
null
;
if
(
readIf
(
"ON"
))
{
on
=
readExpression
();
}
top
.
addJoin
(
join
,
false
,
false
,
on
);
}
else
if
(
readIf
(
"JOIN"
))
{
join
=
readTableFilter
(
fromOuter
);
top
=
readJoin
(
top
,
command
,
false
,
false
);
join
=
readTableFilter
();
top
=
readJoin
(
top
,
false
);
Expression
on
=
null
;
if
(
readIf
(
"ON"
))
{
on
=
readExpression
();
...
...
@@ -1767,11 +1766,11 @@ public class Parser {
top
.
addJoin
(
join
,
false
,
false
,
on
);
}
else
if
(
readIf
(
"CROSS"
))
{
read
(
"JOIN"
);
join
=
readTableFilter
(
fromOuter
);
join
=
readTableFilter
();
top
.
addJoin
(
join
,
false
,
false
,
null
);
}
else
if
(
readIf
(
"NATURAL"
))
{
read
(
"JOIN"
);
join
=
readTableFilter
(
fromOuter
);
join
=
readTableFilter
();
Column
[]
tableCols
=
last
.
getTable
().
getColumns
();
Column
[]
joinCols
=
join
.
getTable
().
getColumns
();
String
tableSchema
=
last
.
getTable
().
getSchema
().
getName
();
...
...
@@ -2105,7 +2104,7 @@ public class Parser {
private
void
parseSelectSimpleFromPart
(
Select
command
)
{
do
{
TableFilter
filter
=
readTableFilter
(
false
);
TableFilter
filter
=
readTableFilter
();
parseJoinTableFilter
(
filter
,
command
);
}
while
(
readIf
(
","
));
...
...
@@ -2150,7 +2149,7 @@ public class Parser {
}
private
void
parseJoinTableFilter
(
TableFilter
top
,
final
Select
command
)
{
top
=
readJoin
(
top
,
command
,
false
,
top
.
isJoinOuter
()
);
top
=
readJoin
(
top
,
false
);
command
.
addTableFilter
(
top
,
true
);
boolean
isOuter
=
false
;
while
(
true
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论