Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
a19a9098
提交
a19a9098
authored
6 年前
作者:
Noel Grandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drop TableView isPersistent field
it is redundant, we already have the isTemporary field in a superclass
上级
6f846985
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
12 行删除
+6
-12
Select.java
h2/src/main/org/h2/command/dml/Select.java
+1
-1
TableView.java
h2/src/main/org/h2/table/TableView.java
+5
-11
没有找到文件。
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
a19a9098
...
...
@@ -1150,7 +1150,7 @@ public class Select extends Query {
TableView
tableView
=
t
.
isView
()
?
(
TableView
)
t
:
null
;
if
(
tableView
!=
null
&&
tableView
.
isRecursive
()
&&
tableView
.
isTableExpression
())
{
if
(
tableView
.
isPersistent
())
{
if
(
!
tableView
.
isTemporary
())
{
// skip the generation of plan SQL for this already recursive persistent CTEs,
// since using a with statement will re-create the common table expression
// views.
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/table/TableView.java
浏览文件 @
a19a9098
...
...
@@ -63,14 +63,13 @@ public class TableView extends Table {
private
ResultInterface
recursiveResult
;
private
boolean
isRecursiveQueryDetected
;
private
boolean
isTableExpression
;
private
boolean
isPersistent
;
public
TableView
(
Schema
schema
,
int
id
,
String
name
,
String
querySQL
,
ArrayList
<
Parameter
>
params
,
Column
[]
columnTemplates
,
Session
session
,
boolean
allowRecursive
,
boolean
literalsChecked
,
boolean
isTableExpression
,
boolean
isPersistent
)
{
super
(
schema
,
id
,
name
,
false
,
true
);
init
(
querySQL
,
params
,
columnTemplates
,
session
,
allowRecursive
,
literalsChecked
,
isTableExpression
,
isPersistent
);
setTemporary
(!
isPersistent
);
init
(
querySQL
,
params
,
columnTemplates
,
session
,
allowRecursive
,
literalsChecked
,
isTableExpression
);
}
/**
...
...
@@ -92,11 +91,11 @@ public class TableView extends Table {
init
(
querySQL
,
null
,
newColumnTemplates
==
null
?
this
.
columnTemplates
:
newColumnTemplates
,
session
,
recursive
,
literalsChecked
,
isTableExpression
,
isPersistent
);
session
,
recursive
,
literalsChecked
,
isTableExpression
);
DbException
e
=
recompile
(
session
,
force
,
true
);
if
(
e
!=
null
)
{
init
(
oldQuerySQL
,
null
,
oldColumnTemplates
,
session
,
oldRecursive
,
literalsChecked
,
isTableExpression
,
isPersistent
);
literalsChecked
,
isTableExpression
);
recompile
(
session
,
true
,
false
);
throw
e
;
}
...
...
@@ -104,13 +103,12 @@ public class TableView extends Table {
private
synchronized
void
init
(
String
querySQL
,
ArrayList
<
Parameter
>
params
,
Column
[]
columnTemplates
,
Session
session
,
boolean
allowRecursive
,
boolean
literalsChecked
,
boolean
isTableExpression
,
boolean
isPersistent
)
{
boolean
isTableExpression
)
{
this
.
querySQL
=
querySQL
;
this
.
columnTemplates
=
columnTemplates
;
this
.
allowRecursive
=
allowRecursive
;
this
.
isRecursiveQueryDetected
=
false
;
this
.
isTableExpression
=
isTableExpression
;
this
.
isPersistent
=
isPersistent
;
index
=
new
ViewIndex
(
this
,
querySQL
,
params
,
allowRecursive
);
initColumnsAndTables
(
session
,
literalsChecked
);
}
...
...
@@ -716,10 +714,6 @@ public class TableView extends Table {
return
tables
;
}
public
boolean
isPersistent
()
{
return
isPersistent
;
}
/**
* Create a view.
*
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论