Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
c7038923
Unverified
提交
c7038923
authored
11月 21, 2018
作者:
Evgenij Ryazanov
提交者:
GitHub
11月 21, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1564 from katzyn/expression
Refactor Expression implementations
上级
15476b8b
dc89e63f
隐藏空白字符变更
内嵌
并排
正在显示
49 个修改的文件
包含
260 行增加
和
157 行删除
+260
-157
help.csv
h2/src/docsrc/help/help.csv
+1
-1
faq.html
h2/src/docsrc/html/faq.html
+2
-1
Parser.java
h2/src/main/org/h2/command/Parser.java
+14
-14
Insert.java
h2/src/main/org/h2/command/dml/Insert.java
+1
-9
Merge.java
h2/src/main/org/h2/command/dml/Merge.java
+1
-9
Query.java
h2/src/main/org/h2/command/dml/Query.java
+3
-3
Replace.java
h2/src/main/org/h2/command/dml/Replace.java
+1
-9
Select.java
h2/src/main/org/h2/command/dml/Select.java
+9
-9
SelectGroups.java
h2/src/main/org/h2/command/dml/SelectGroups.java
+2
-2
BinaryOperation.java
h2/src/main/org/h2/expression/BinaryOperation.java
+1
-0
CompareLike.java
h2/src/main/org/h2/expression/CompareLike.java
+22
-0
ConditionIn.java
h2/src/main/org/h2/expression/ConditionIn.java
+16
-0
ConditionInConstantSet.java
h2/src/main/org/h2/expression/ConditionInConstantSet.java
+16
-0
Expression.java
h2/src/main/org/h2/expression/Expression.java
+7
-2
ExpressionList.java
h2/src/main/org/h2/expression/ExpressionList.java
+10
-0
IntervalOperation.java
h2/src/main/org/h2/expression/IntervalOperation.java
+14
-15
AbstractAggregate.java
...c/main/org/h2/expression/aggregate/AbstractAggregate.java
+2
-0
Aggregate.java
h2/src/main/org/h2/expression/aggregate/Aggregate.java
+1
-15
package.html
h2/src/main/org/h2/expression/aggregate/package.html
+1
-1
DataAnalysisOperation.java
...ain/org/h2/expression/analysis/DataAnalysisOperation.java
+21
-6
PartitionData.java
h2/src/main/org/h2/expression/analysis/PartitionData.java
+1
-1
Window.java
h2/src/main/org/h2/expression/analysis/Window.java
+4
-2
WindowFrame.java
h2/src/main/org/h2/expression/analysis/WindowFrame.java
+1
-1
WindowFrameBound.java
h2/src/main/org/h2/expression/analysis/WindowFrameBound.java
+1
-1
WindowFrameBoundType.java
...main/org/h2/expression/analysis/WindowFrameBoundType.java
+1
-1
WindowFrameExclusion.java
...main/org/h2/expression/analysis/WindowFrameExclusion.java
+1
-1
WindowFrameUnits.java
h2/src/main/org/h2/expression/analysis/WindowFrameUnits.java
+1
-1
WindowFunction.java
h2/src/main/org/h2/expression/analysis/WindowFunction.java
+1
-1
WindowFunctionType.java
...c/main/org/h2/expression/analysis/WindowFunctionType.java
+1
-1
package.html
h2/src/main/org/h2/expression/analysis/package.html
+14
-0
DateTimeFunctions.java
...rc/main/org/h2/expression/function/DateTimeFunctions.java
+27
-25
Function.java
h2/src/main/org/h2/expression/function/Function.java
+7
-4
FunctionCall.java
h2/src/main/org/h2/expression/function/FunctionCall.java
+2
-1
FunctionInfo.java
h2/src/main/org/h2/expression/function/FunctionInfo.java
+1
-1
JavaFunction.java
h2/src/main/org/h2/expression/function/JavaFunction.java
+14
-1
TableFunction.java
h2/src/main/org/h2/expression/function/TableFunction.java
+3
-1
ToChar.java
h2/src/main/org/h2/expression/function/ToChar.java
+3
-1
ToDateParser.java
h2/src/main/org/h2/expression/function/ToDateParser.java
+2
-1
ToDateTokenizer.java
h2/src/main/org/h2/expression/function/ToDateTokenizer.java
+1
-1
package.html
h2/src/main/org/h2/expression/function/package.html
+14
-0
package.html
h2/src/main/org/h2/expression/package.html
+1
-1
FunctionsBase.java
h2/src/main/org/h2/mode/FunctionsBase.java
+2
-2
FunctionsMSSQLServer.java
h2/src/main/org/h2/mode/FunctionsMSSQLServer.java
+2
-2
FunctionsMySQL.java
h2/src/main/org/h2/mode/FunctionsMySQL.java
+2
-2
MVStore.java
h2/src/main/org/h2/mvstore/MVStore.java
+1
-1
FunctionTable.java
h2/src/main/org/h2/table/FunctionTable.java
+2
-2
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+2
-2
TestClearReferences.java
h2/src/test/org/h2/test/unit/TestClearReferences.java
+2
-2
TestStringUtils.java
h2/src/test/org/h2/test/unit/TestStringUtils.java
+1
-1
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
c7038923
...
...
@@ -531,7 +531,7 @@ CREATE AGGREGATE [ IF NOT EXISTS ] newAggregateName FOR className
","
Creates a new user-defined aggregate function. The method name must be the full
qualified class name. The class must implement the interface
""org.h2.api.AggregateFunction"".
""org.h2.api.Aggregate
"" or ""org.h2.api.Aggregate
Function"".
Admin rights are required to execute this command.
This command commits an open transaction in this connection.
...
...
h2/src/docsrc/html/faq.html
浏览文件 @
c7038923
...
...
@@ -180,7 +180,8 @@ Areas considered experimental are:
<li>
The PostgreSQL server
</li><li>
Clustering (there are cases were transaction isolation can be broken
due to timing issues, for example one session overtaking another session).
</li><li>
Multi-threading within the engine using
<code>
SET MULTI_THREADED=1
</code>
.
</li><li>
Multi-threading within the old PageStore engine using
<code>
SET MULTI_THREADED=1
</code>
.
Default MVStore engine is multi-threaded by default.
</li><li>
Compatibility modes for other databases (only some features are implemented).
</li><li>
The soft reference cache (
<code>
CACHE_TYPE=SOFT_LRU
</code>
). It might not improve performance,
and out of memory issues have been reported.
...
...
h2/src/main/org/h2/command/Parser.java
浏览文件 @
c7038923
...
...
@@ -160,14 +160,10 @@ import org.h2.expression.ConditionNot;
import
org.h2.expression.Expression
;
import
org.h2.expression.ExpressionColumn
;
import
org.h2.expression.ExpressionList
;
import
org.h2.expression.Function
;
import
org.h2.expression.FunctionCall
;
import
org.h2.expression.JavaFunction
;
import
org.h2.expression.Parameter
;
import
org.h2.expression.Rownum
;
import
org.h2.expression.SequenceValue
;
import
org.h2.expression.Subquery
;
import
org.h2.expression.TableFunction
;
import
org.h2.expression.UnaryOperation
;
import
org.h2.expression.ValueExpression
;
import
org.h2.expression.Variable
;
...
...
@@ -175,16 +171,21 @@ import org.h2.expression.Wildcard;
import
org.h2.expression.aggregate.AbstractAggregate
;
import
org.h2.expression.aggregate.Aggregate
;
import
org.h2.expression.aggregate.Aggregate.AggregateType
;
import
org.h2.expression.aggregate.DataAnalysisOperation
;
import
org.h2.expression.aggregate.JavaAggregate
;
import
org.h2.expression.aggregate.Window
;
import
org.h2.expression.aggregate.WindowFrame
;
import
org.h2.expression.aggregate.WindowFrameBound
;
import
org.h2.expression.aggregate.WindowFrameBoundType
;
import
org.h2.expression.aggregate.WindowFrameExclusion
;
import
org.h2.expression.aggregate.WindowFrameUnits
;
import
org.h2.expression.aggregate.WindowFunction
;
import
org.h2.expression.aggregate.WindowFunctionType
;
import
org.h2.expression.analysis.DataAnalysisOperation
;
import
org.h2.expression.analysis.Window
;
import
org.h2.expression.analysis.WindowFrame
;
import
org.h2.expression.analysis.WindowFrameBound
;
import
org.h2.expression.analysis.WindowFrameBoundType
;
import
org.h2.expression.analysis.WindowFrameExclusion
;
import
org.h2.expression.analysis.WindowFrameUnits
;
import
org.h2.expression.analysis.WindowFunction
;
import
org.h2.expression.analysis.WindowFunctionType
;
import
org.h2.expression.function.DateTimeFunctions
;
import
org.h2.expression.function.Function
;
import
org.h2.expression.function.FunctionCall
;
import
org.h2.expression.function.JavaFunction
;
import
org.h2.expression.function.TableFunction
;
import
org.h2.index.Index
;
import
org.h2.message.DbException
;
import
org.h2.result.SortOrder
;
...
...
@@ -199,7 +200,6 @@ import org.h2.table.Table;
import
org.h2.table.TableFilter
;
import
org.h2.table.TableFilter.TableFilterVisitor
;
import
org.h2.table.TableView
;
import
org.h2.util.DateTimeFunctions
;
import
org.h2.util.IntervalUtils
;
import
org.h2.util.MathUtils
;
import
org.h2.util.ParserUtil
;
...
...
h2/src/main/org/h2/command/dml/Insert.java
浏览文件 @
c7038923
...
...
@@ -305,15 +305,7 @@ public class Insert extends Prepared implements ResultTarget {
buff
.
append
(
",\n"
);
}
buff
.
append
(
'('
);
buff
.
resetCount
();
for
(
Expression
e
:
expr
)
{
buff
.
appendExceptFirst
(
", "
);
if
(
e
==
null
)
{
buff
.
append
(
"DEFAULT"
);
}
else
{
e
.
getSQL
(
buff
.
builder
());
}
}
Expression
.
writeExpressions
(
buff
.
builder
(),
expr
);
buff
.
append
(
')'
);
}
}
else
{
...
...
h2/src/main/org/h2/command/dml/Merge.java
浏览文件 @
c7038923
...
...
@@ -242,15 +242,7 @@ public class Merge extends Prepared {
buff
.
append
(
", "
);
}
buff
.
append
(
'('
);
buff
.
resetCount
();
for
(
Expression
e
:
expr
)
{
buff
.
appendExceptFirst
(
", "
);
if
(
e
==
null
)
{
buff
.
append
(
"DEFAULT"
);
}
else
{
e
.
getSQL
(
buff
.
builder
());
}
}
Expression
.
writeExpressions
(
buff
.
builder
(),
expr
);
buff
.
append
(
')'
);
}
}
else
{
...
...
h2/src/main/org/h2/command/dml/Query.java
浏览文件 @
c7038923
...
...
@@ -19,9 +19,9 @@ import org.h2.expression.Alias;
import
org.h2.expression.Expression
;
import
org.h2.expression.ExpressionColumn
;
import
org.h2.expression.ExpressionVisitor
;
import
org.h2.expression.Function
;
import
org.h2.expression.Parameter
;
import
org.h2.expression.ValueExpression
;
import
org.h2.expression.function.FunctionCall
;
import
org.h2.message.DbException
;
import
org.h2.result.ResultInterface
;
import
org.h2.result.ResultTarget
;
...
...
@@ -555,8 +555,8 @@ public abstract class Query extends Prepared {
}
}
int
count
=
expr
.
getSubexpressionCount
();
if
(
expr
instanceof
Function
)
{
if
(!((
Function
)
expr
).
isDeterministic
())
{
if
(
expr
instanceof
Function
Call
)
{
if
(!((
Function
Call
)
expr
).
isDeterministic
())
{
return
false
;
}
}
else
if
(
count
<=
0
)
{
...
...
h2/src/main/org/h2/command/dml/Replace.java
浏览文件 @
c7038923
...
...
@@ -222,15 +222,7 @@ public class Replace extends Prepared {
buff
.
append
(
", "
);
}
buff
.
append
(
'('
);
buff
.
resetCount
();
for
(
Expression
e
:
expr
)
{
buff
.
appendExceptFirst
(
", "
);
if
(
e
==
null
)
{
buff
.
append
(
"DEFAULT"
);
}
else
{
e
.
getSQL
(
buff
.
builder
());
}
}
Expression
.
writeExpressions
(
buff
.
builder
(),
expr
);
buff
.
append
(
')'
);
}
}
else
{
...
...
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
c7038923
...
...
@@ -25,8 +25,8 @@ import org.h2.expression.ExpressionColumn;
import
org.h2.expression.ExpressionVisitor
;
import
org.h2.expression.Parameter
;
import
org.h2.expression.Wildcard
;
import
org.h2.expression.a
ggregate.Aggregate
;
import
org.h2.expression.a
ggregate
.Window
;
import
org.h2.expression.a
nalysis.DataAnalysisOperation
;
import
org.h2.expression.a
nalysis
.Window
;
import
org.h2.index.Cursor
;
import
org.h2.index.Index
;
import
org.h2.index.IndexType
;
...
...
@@ -389,7 +389,7 @@ public class Select extends Query {
private
void
queryWindow
(
int
columnCount
,
LocalResult
result
,
long
offset
,
boolean
quickOffset
)
{
initGroupData
(
columnCount
);
try
{
gatherGroup
(
columnCount
,
Aggregate
.
STAGE_WINDOW
);
gatherGroup
(
columnCount
,
DataAnalysisOperation
.
STAGE_WINDOW
);
processGroupResult
(
columnCount
,
result
,
offset
,
quickOffset
);
}
finally
{
groupData
.
reset
();
...
...
@@ -399,12 +399,12 @@ public class Select extends Query {
private
void
queryGroupWindow
(
int
columnCount
,
LocalResult
result
,
long
offset
,
boolean
quickOffset
)
{
initGroupData
(
columnCount
);
try
{
gatherGroup
(
columnCount
,
Aggregate
.
STAGE_GROUP
);
gatherGroup
(
columnCount
,
DataAnalysisOperation
.
STAGE_GROUP
);
try
{
isGroupWindowStage2
=
true
;
while
(
groupData
.
next
()
!=
null
)
{
if
(
havingIndex
<
0
||
expressions
.
get
(
havingIndex
).
getBooleanValue
(
session
))
{
updateAgg
(
columnCount
,
Aggregate
.
STAGE_WINDOW
);
updateAgg
(
columnCount
,
DataAnalysisOperation
.
STAGE_WINDOW
);
}
else
{
groupData
.
remove
();
}
...
...
@@ -422,7 +422,7 @@ public class Select extends Query {
private
void
queryGroup
(
int
columnCount
,
LocalResult
result
,
long
offset
,
boolean
quickOffset
)
{
initGroupData
(
columnCount
);
try
{
gatherGroup
(
columnCount
,
Aggregate
.
STAGE_GROUP
);
gatherGroup
(
columnCount
,
DataAnalysisOperation
.
STAGE_GROUP
);
processGroupResult
(
columnCount
,
result
,
offset
,
quickOffset
);
}
finally
{
groupData
.
reset
();
...
...
@@ -433,7 +433,7 @@ public class Select extends Query {
if
(
groupData
==
null
)
{
groupData
=
SelectGroups
.
getInstance
(
session
,
expressions
,
isGroupQuery
,
groupIndex
);
}
else
{
updateAgg
(
columnCount
,
Aggregate
.
STAGE_RESET
);
updateAgg
(
columnCount
,
DataAnalysisOperation
.
STAGE_RESET
);
}
groupData
.
reset
();
}
...
...
@@ -1742,7 +1742,7 @@ public class Select extends Query {
groupData
=
SelectGroups
.
getInstance
(
getSession
(),
Select
.
this
.
expressions
,
isGroupQuery
,
groupIndex
);
}
else
{
// TODO is this branch possible?
updateAgg
(
columnCount
,
Aggregate
.
STAGE_RESET
);
updateAgg
(
columnCount
,
DataAnalysisOperation
.
STAGE_RESET
);
groupData
.
resetLazy
();
}
}
...
...
@@ -1778,7 +1778,7 @@ public class Select extends Query {
groupData
.
nextLazyGroup
();
}
groupData
.
nextLazyRow
();
updateAgg
(
columnCount
,
Aggregate
.
STAGE_GROUP
);
updateAgg
(
columnCount
,
DataAnalysisOperation
.
STAGE_GROUP
);
if
(
row
!=
null
)
{
return
row
;
}
...
...
h2/src/main/org/h2/command/dml/SelectGroups.java
浏览文件 @
c7038923
...
...
@@ -14,8 +14,8 @@ import java.util.Map.Entry;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
import
org.h2.expression.a
ggregate
.DataAnalysisOperation
;
import
org.h2.expression.a
ggregate
.PartitionData
;
import
org.h2.expression.a
nalysis
.DataAnalysisOperation
;
import
org.h2.expression.a
nalysis
.PartitionData
;
import
org.h2.util.ValueHashMap
;
import
org.h2.value.Value
;
import
org.h2.value.ValueArray
;
...
...
h2/src/main/org/h2/expression/BinaryOperation.java
浏览文件 @
c7038923
...
...
@@ -8,6 +8,7 @@ package org.h2.expression;
import
org.h2.engine.Mode
;
import
org.h2.engine.Session
;
import
org.h2.expression.IntervalOperation.IntervalOpType
;
import
org.h2.expression.function.Function
;
import
org.h2.message.DbException
;
import
org.h2.table.ColumnResolver
;
import
org.h2.table.TableFilter
;
...
...
h2/src/main/org/h2/expression/CompareLike.java
浏览文件 @
c7038923
...
...
@@ -517,4 +517,26 @@ public class CompareLike extends Condition {
return
left
.
getCost
()
+
right
.
getCost
()
+
3
;
}
@Override
public
int
getSubexpressionCount
()
{
return
escape
==
null
?
2
:
3
;
}
@Override
public
Expression
getSubexpression
(
int
index
)
{
switch
(
index
)
{
case
0
:
return
left
;
case
1
:
return
right
;
case
2
:
if
(
escape
!=
null
)
{
return
escape
;
}
//$FALL-THROUGH$
default
:
throw
new
IndexOutOfBoundsException
();
}
}
}
h2/src/main/org/h2/expression/ConditionIn.java
浏览文件 @
c7038923
...
...
@@ -207,4 +207,20 @@ public class ConditionIn extends Condition {
}
return
null
;
}
@Override
public
int
getSubexpressionCount
()
{
return
1
+
valueList
.
size
();
}
@Override
public
Expression
getSubexpression
(
int
index
)
{
if
(
index
==
0
)
{
return
left
;
}
else
if
(
index
>
0
&&
index
<=
valueList
.
size
())
{
return
valueList
.
get
(
index
-
1
);
}
throw
new
IndexOutOfBoundsException
();
}
}
h2/src/main/org/h2/expression/ConditionInConstantSet.java
浏览文件 @
c7038923
...
...
@@ -176,4 +176,20 @@ public class ConditionInConstantSet extends Condition {
}
return
null
;
}
@Override
public
int
getSubexpressionCount
()
{
return
1
+
valueList
.
size
();
}
@Override
public
Expression
getSubexpression
(
int
index
)
{
if
(
index
==
0
)
{
return
left
;
}
else
if
(
index
>
0
&&
index
<=
valueList
.
size
())
{
return
valueList
.
get
(
index
-
1
);
}
throw
new
IndexOutOfBoundsException
();
}
}
h2/src/main/org/h2/expression/Expression.java
浏览文件 @
c7038923
...
...
@@ -54,7 +54,12 @@ public abstract class Expression {
if
(
i
>
0
)
{
builder
.
append
(
", "
);
}
expressions
[
i
].
getSQL
(
builder
);
Expression
e
=
expressions
[
i
];
if
(
e
==
null
)
{
builder
.
append
(
"DEFAULT"
);
}
else
{
e
.
getSQL
(
builder
);
}
}
}
...
...
@@ -373,7 +378,7 @@ public abstract class Expression {
* @param value the value to extract columns from
* @return array of expression columns
*/
static
Expression
[]
getExpressionColumns
(
Session
session
,
ValueArray
value
)
{
protected
static
Expression
[]
getExpressionColumns
(
Session
session
,
ValueArray
value
)
{
Value
[]
list
=
value
.
getList
();
ExpressionColumn
[]
expr
=
new
ExpressionColumn
[
list
.
length
];
for
(
int
i
=
0
,
len
=
list
.
length
;
i
<
len
;
i
++)
{
...
...
h2/src/main/org/h2/expression/ExpressionList.java
浏览文件 @
c7038923
...
...
@@ -132,4 +132,14 @@ public class ExpressionList extends Expression {
return
expr
;
}
@Override
public
int
getSubexpressionCount
()
{
return
list
.
length
;
}
@Override
public
Expression
getSubexpression
(
int
index
)
{
return
list
[
index
];
}
}
h2/src/main/org/h2/expression/IntervalOperation.java
浏览文件 @
c7038923
...
...
@@ -20,10 +20,10 @@ import java.math.BigInteger;
import
org.h2.api.ErrorCode
;
import
org.h2.api.IntervalQualifier
;
import
org.h2.engine.Session
;
import
org.h2.expression.function.DateTimeFunctions
;
import
org.h2.message.DbException
;
import
org.h2.table.ColumnResolver
;
import
org.h2.table.TableFilter
;
import
org.h2.util.DateTimeFunctions
;
import
org.h2.util.IntervalUtils
;
import
org.h2.value.DataType
;
import
org.h2.value.Value
;
...
...
@@ -312,22 +312,21 @@ public class IntervalOperation extends Expression {
return
left
.
getCost
()
+
1
+
right
.
getCost
();
}
/**
* Get the left sub-expression of this operation.
*
* @return the left sub-expression
*/
public
Expression
getLeftSubExpression
()
{
return
left
;
@Override
public
int
getSubexpressionCount
()
{
return
2
;
}
/**
* Get the right sub-expression of this operation.
*
* @return the right sub-expression
*/
public
Expression
getRightSubExpression
()
{
return
right
;
@Override
public
Expression
getSubexpression
(
int
index
)
{
switch
(
index
)
{
case
0
:
return
left
;
case
1
:
return
right
;
default
:
throw
new
IndexOutOfBoundsException
();
}
}
}
h2/src/main/org/h2/expression/aggregate/AbstractAggregate.java
浏览文件 @
c7038923
...
...
@@ -14,6 +14,8 @@ import org.h2.command.dml.SelectGroups;
import
org.h2.command.dml.SelectOrderBy
;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
import
org.h2.expression.analysis.DataAnalysisOperation
;
import
org.h2.expression.analysis.WindowFrame
;
import
org.h2.table.ColumnResolver
;
import
org.h2.table.TableFilter
;
import
org.h2.value.Value
;
...
...
h2/src/main/org/h2/expression/aggregate/Aggregate.java
浏览文件 @
c7038923
...
...
@@ -19,6 +19,7 @@ import org.h2.engine.Session;
import
org.h2.expression.Expression
;
import
org.h2.expression.ExpressionColumn
;
import
org.h2.expression.ExpressionVisitor
;
import
org.h2.expression.analysis.Window
;
import
org.h2.index.Cursor
;
import
org.h2.index.Index
;
import
org.h2.message.DbException
;
...
...
@@ -154,21 +155,6 @@ public class Aggregate extends AbstractAggregate {
ENVELOPE
,
}
/**
* Reset stage. Used to reset internal data to its initial state.
*/
public
static
final
int
STAGE_RESET
=
0
;
/**
* Group stage, used for explicit or implicit GROUP BY operation.
*/
public
static
final
int
STAGE_GROUP
=
1
;
/**
* Window processing stage.
*/
public
static
final
int
STAGE_WINDOW
=
2
;
private
static
final
HashMap
<
String
,
AggregateType
>
AGGREGATES
=
new
HashMap
<>(
64
);
private
final
AggregateType
type
;
...
...
h2/src/main/org/h2/expression/aggregate/package.html
浏览文件 @
c7038923
...
...
@@ -9,6 +9,6 @@ Initial Developer: H2 Group
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
Aggregate
and window
functions.
Aggregate functions.
</p></body></html>
\ No newline at end of file
h2/src/main/org/h2/expression/a
ggregate
/DataAnalysisOperation.java
→
h2/src/main/org/h2/expression/a
nalysis
/DataAnalysisOperation.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
.
a
ggregate
;
package
org
.
h2
.
expression
.
a
nalysis
;
import
java.util.ArrayList
;
import
java.util.Collections
;
...
...
@@ -29,6 +29,21 @@ import org.h2.value.ValueInt;
*/
public
abstract
class
DataAnalysisOperation
extends
Expression
{
/**
* Reset stage. Used to reset internal data to its initial state.
*/
public
static
final
int
STAGE_RESET
=
0
;
/**
* Group stage, used for explicit or implicit GROUP BY operation.
*/
public
static
final
int
STAGE_GROUP
=
1
;
/**
* Window processing stage.
*/
public
static
final
int
STAGE_WINDOW
=
2
;
protected
final
Select
select
;
protected
Window
over
;
...
...
@@ -49,7 +64,7 @@ public abstract class DataAnalysisOperation extends Expression {
return
new
SortOrder
(
session
.
getDatabase
(),
index
,
sortType
,
null
);
}
DataAnalysisOperation
(
Select
select
)
{
protected
DataAnalysisOperation
(
Select
select
)
{
this
.
select
=
select
;
}
...
...
@@ -76,7 +91,7 @@ public abstract class DataAnalysisOperation extends Expression {
*
* @return the sort order for OVER clause
*/
SortOrder
getOverOrderBySort
()
{
protected
SortOrder
getOverOrderBySort
()
{
return
overOrderBySort
;
}
...
...
@@ -125,12 +140,12 @@ public abstract class DataAnalysisOperation extends Expression {
@Override
public
final
void
updateAggregate
(
Session
session
,
int
stage
)
{
if
(
stage
==
Aggregate
.
STAGE_RESET
)
{
updateGroupAggregates
(
session
,
Aggregate
.
STAGE_RESET
);
if
(
stage
==
STAGE_RESET
)
{
updateGroupAggregates
(
session
,
STAGE_RESET
);
lastGroupRowId
=
0
;
return
;
}
boolean
window
=
stage
==
Aggregate
.
STAGE_WINDOW
;
boolean
window
=
stage
==
STAGE_WINDOW
;
if
(
window
!=
(
over
!=
null
))
{
if
(!
window
&&
select
.
isWindowQuery
())
{
updateGroupAggregates
(
session
,
stage
);
...
...
h2/src/main/org/h2/expression/a
ggregate
/PartitionData.java
→
h2/src/main/org/h2/expression/a
nalysis
/PartitionData.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
.
a
ggregate
;
package
org
.
h2
.
expression
.
a
nalysis
;
import
java.util.HashMap
;
...
...
h2/src/main/org/h2/expression/a
ggregate
/Window.java
→
h2/src/main/org/h2/expression/a
nalysis
/Window.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
.
a
ggregate
;
package
org
.
h2
.
expression
.
a
nalysis
;
import
java.util.ArrayList
;
...
...
@@ -32,12 +32,14 @@ public final class Window {
private
String
parent
;
/**
* Appends ORDER BY clause to the specified builder.
*
* @param builder
* string builder
* @param orderBy
* ORDER BY clause, or null
*/
static
void
appendOrderBy
(
StringBuilder
builder
,
ArrayList
<
SelectOrderBy
>
orderBy
)
{
public
static
void
appendOrderBy
(
StringBuilder
builder
,
ArrayList
<
SelectOrderBy
>
orderBy
)
{
if
(
orderBy
!=
null
&&
!
orderBy
.
isEmpty
())
{
if
(
builder
.
charAt
(
builder
.
length
()
-
1
)
!=
'('
)
{
builder
.
append
(
' '
);
...
...
h2/src/main/org/h2/expression/a
ggregate
/WindowFrame.java
→
h2/src/main/org/h2/expression/a
nalysis
/WindowFrame.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
.
a
ggregate
;
package
org
.
h2
.
expression
.
a
nalysis
;
import
java.util.ArrayList
;
import
java.util.Collections
;
...
...
h2/src/main/org/h2/expression/a
ggregate
/WindowFrameBound.java
→
h2/src/main/org/h2/expression/a
nalysis
/WindowFrameBound.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
.
a
ggregate
;
package
org
.
h2
.
expression
.
a
nalysis
;
import
org.h2.expression.Expression
;
...
...
h2/src/main/org/h2/expression/a
ggregate
/WindowFrameBoundType.java
→
h2/src/main/org/h2/expression/a
nalysis
/WindowFrameBoundType.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
.
a
ggregate
;
package
org
.
h2
.
expression
.
a
nalysis
;
/**
* Window frame bound type.
...
...
h2/src/main/org/h2/expression/a
ggregate
/WindowFrameExclusion.java
→
h2/src/main/org/h2/expression/a
nalysis
/WindowFrameExclusion.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
.
a
ggregate
;
package
org
.
h2
.
expression
.
a
nalysis
;
/**
* Window frame exclusion clause.
...
...
h2/src/main/org/h2/expression/a
ggregate
/WindowFrameUnits.java
→
h2/src/main/org/h2/expression/a
nalysis
/WindowFrameUnits.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
.
a
ggregate
;
package
org
.
h2
.
expression
.
a
nalysis
;
/**
* Window frame units.
...
...
h2/src/main/org/h2/expression/a
ggregate
/WindowFunction.java
→
h2/src/main/org/h2/expression/a
nalysis
/WindowFunction.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
.
a
ggregate
;
package
org
.
h2
.
expression
.
a
nalysis
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
h2/src/main/org/h2/expression/a
ggregate
/WindowFunctionType.java
→
h2/src/main/org/h2/expression/a
nalysis
/WindowFunctionType.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
.
a
ggregate
;
package
org
.
h2
.
expression
.
a
nalysis
;
/**
* A type of a window function.
...
...
h2/src/main/org/h2/expression/analysis/package.html
0 → 100644
浏览文件 @
c7038923
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
Base classes for data analysis operations and implementations of window functions.
</p></body></html>
\ No newline at end of file
h2/src/main/org/h2/
util
/DateTimeFunctions.java
→
h2/src/main/org/h2/
expression/function
/DateTimeFunctions.java
浏览文件 @
c7038923
...
...
@@ -3,30 +3,30 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
util
;
import
static
org
.
h2
.
expression
.
Function
.
CENTURY
;
import
static
org
.
h2
.
expression
.
Function
.
DAY_OF_MONTH
;
import
static
org
.
h2
.
expression
.
Function
.
DAY_OF_WEEK
;
import
static
org
.
h2
.
expression
.
Function
.
DAY_OF_YEAR
;
import
static
org
.
h2
.
expression
.
Function
.
DECADE
;
import
static
org
.
h2
.
expression
.
Function
.
EPOCH
;
import
static
org
.
h2
.
expression
.
Function
.
HOUR
;
import
static
org
.
h2
.
expression
.
Function
.
ISO_DAY_OF_WEEK
;
import
static
org
.
h2
.
expression
.
Function
.
ISO_WEEK
;
import
static
org
.
h2
.
expression
.
Function
.
ISO_YEAR
;
import
static
org
.
h2
.
expression
.
Function
.
MICROSECOND
;
import
static
org
.
h2
.
expression
.
Function
.
MILLENNIUM
;
import
static
org
.
h2
.
expression
.
Function
.
MILLISECOND
;
import
static
org
.
h2
.
expression
.
Function
.
MINUTE
;
import
static
org
.
h2
.
expression
.
Function
.
MONTH
;
import
static
org
.
h2
.
expression
.
Function
.
NANOSECOND
;
import
static
org
.
h2
.
expression
.
Function
.
QUARTER
;
import
static
org
.
h2
.
expression
.
Function
.
SECOND
;
import
static
org
.
h2
.
expression
.
Function
.
TIMEZONE_HOUR
;
import
static
org
.
h2
.
expression
.
Function
.
TIMEZONE_MINUTE
;
import
static
org
.
h2
.
expression
.
Function
.
WEEK
;
import
static
org
.
h2
.
expression
.
Function
.
YEAR
;
package
org
.
h2
.
expression
.
function
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
CENTURY
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
DAY_OF_MONTH
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
DAY_OF_WEEK
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
DAY_OF_YEAR
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
DECADE
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
EPOCH
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
HOUR
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
ISO_DAY_OF_WEEK
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
ISO_WEEK
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
ISO_YEAR
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
MICROSECOND
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
MILLENNIUM
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
MILLISECOND
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
MINUTE
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
MONTH
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
NANOSECOND
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
QUARTER
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
SECOND
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
TIMEZONE_HOUR
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
TIMEZONE_MINUTE
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
WEEK
;
import
static
org
.
h2
.
expression
.
function
.
Function
.
YEAR
;
import
static
org
.
h2
.
util
.
DateTimeUtils
.
MILLIS_PER_DAY
;
import
static
org
.
h2
.
util
.
DateTimeUtils
.
NANOS_PER_DAY
;
import
static
org
.
h2
.
util
.
DateTimeUtils
.
NANOS_PER_HOUR
;
...
...
@@ -43,8 +43,10 @@ import java.util.TimeZone;
import
org.h2.api.ErrorCode
;
import
org.h2.api.IntervalQualifier
;
import
org.h2.expression.Function
;
import
org.h2.message.DbException
;
import
org.h2.util.DateTimeUtils
;
import
org.h2.util.IntervalUtils
;
import
org.h2.util.StringUtils
;
import
org.h2.value.Value
;
import
org.h2.value.ValueDate
;
import
org.h2.value.ValueDecimal
;
...
...
h2/src/main/org/h2/expression/Function.java
→
h2/src/main/org/h2/expression/
function/
Function.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
;
package
org
.
h2
.
expression
.
function
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
...
...
@@ -28,6 +28,12 @@ import org.h2.engine.Constants;
import
org.h2.engine.Database
;
import
org.h2.engine.Mode
;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
import
org.h2.expression.ExpressionColumn
;
import
org.h2.expression.ExpressionVisitor
;
import
org.h2.expression.SequenceValue
;
import
org.h2.expression.ValueExpression
;
import
org.h2.expression.Variable
;
import
org.h2.index.Index
;
import
org.h2.message.DbException
;
import
org.h2.mode.FunctionsMSSQLServer
;
...
...
@@ -46,14 +52,11 @@ import org.h2.table.TableFilter;
import
org.h2.tools.CompressTool
;
import
org.h2.tools.Csv
;
import
org.h2.util.Bits
;
import
org.h2.util.DateTimeFunctions
;
import
org.h2.util.DateTimeUtils
;
import
org.h2.util.IOUtils
;
import
org.h2.util.JdbcUtils
;
import
org.h2.util.MathUtils
;
import
org.h2.util.StringUtils
;
import
org.h2.util.ToChar
;
import
org.h2.util.ToDateParser
;
import
org.h2.util.Utils
;
import
org.h2.value.DataType
;
import
org.h2.value.ExtTypeInfo
;
...
...
h2/src/main/org/h2/expression/FunctionCall.java
→
h2/src/main/org/h2/expression/
function/
FunctionCall.java
浏览文件 @
c7038923
...
...
@@ -3,9 +3,10 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
;
package
org
.
h2
.
expression
.
function
;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
import
org.h2.value.ValueResultSet
;
/**
...
...
h2/src/main/org/h2/expression/FunctionInfo.java
→
h2/src/main/org/h2/expression/
function/
FunctionInfo.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
;
package
org
.
h2
.
expression
.
function
;
/**
* This class contains information about a built-in function.
...
...
h2/src/main/org/h2/expression/JavaFunction.java
→
h2/src/main/org/h2/expression/
function/
JavaFunction.java
浏览文件 @
c7038923
...
...
@@ -3,12 +3,15 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
;
package
org
.
h2
.
expression
.
function
;
import
org.h2.command.Parser
;
import
org.h2.engine.Constants
;
import
org.h2.engine.FunctionAlias
;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
import
org.h2.expression.ExpressionVisitor
;
import
org.h2.expression.ValueExpression
;
import
org.h2.table.ColumnResolver
;
import
org.h2.table.TableFilter
;
import
org.h2.value.DataType
;
...
...
@@ -178,4 +181,14 @@ public class JavaFunction extends Expression implements FunctionCall {
return
functionAlias
.
isBufferResultSetToLocalTemp
();
}
@Override
public
int
getSubexpressionCount
()
{
return
args
.
length
;
}
@Override
public
Expression
getSubexpression
(
int
index
)
{
return
args
[
index
];
}
}
h2/src/main/org/h2/expression/TableFunction.java
→
h2/src/main/org/h2/expression/
function/
TableFunction.java
浏览文件 @
c7038923
...
...
@@ -3,13 +3,15 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
expression
;
package
org
.
h2
.
expression
.
function
;
import
java.util.ArrayList
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Database
;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
import
org.h2.expression.ExpressionColumn
;
import
org.h2.message.DbException
;
import
org.h2.result.LocalResult
;
import
org.h2.table.Column
;
...
...
h2/src/main/org/h2/
util
/ToChar.java
→
h2/src/main/org/h2/
expression/function
/ToChar.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: Daniel Gredler
*/
package
org
.
h2
.
util
;
package
org
.
h2
.
expression
.
function
;
import
java.math.BigDecimal
;
import
java.text.DateFormatSymbols
;
...
...
@@ -17,6 +17,8 @@ import java.util.TimeZone;
import
org.h2.api.ErrorCode
;
import
org.h2.message.DbException
;
import
org.h2.util.DateTimeUtils
;
import
org.h2.util.StringUtils
;
import
org.h2.value.Value
;
import
org.h2.value.ValueTimestampTimeZone
;
...
...
h2/src/main/org/h2/
util
/ToDateParser.java
→
h2/src/main/org/h2/
expression/function
/ToDateParser.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: Daniel Gredler
*/
package
org
.
h2
.
util
;
package
org
.
h2
.
expression
.
function
;
import
static
java
.
lang
.
String
.
format
;
...
...
@@ -12,6 +12,7 @@ import java.util.GregorianCalendar;
import
java.util.List
;
import
java.util.TimeZone
;
import
org.h2.util.DateTimeUtils
;
import
org.h2.value.ValueTimestamp
;
import
org.h2.value.ValueTimestampTimeZone
;
...
...
h2/src/main/org/h2/
util
/ToDateTokenizer.java
→
h2/src/main/org/h2/
expression/function
/ToDateTokenizer.java
浏览文件 @
c7038923
...
...
@@ -3,7 +3,7 @@
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: Daniel Gredler
*/
package
org
.
h2
.
util
;
package
org
.
h2
.
expression
.
function
;
import
static
java
.
lang
.
String
.
format
;
import
java.util.ArrayList
;
...
...
h2/src/main/org/h2/expression/function/package.html
0 → 100644
浏览文件 @
c7038923
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
Functions.
</p></body></html>
\ No newline at end of file
h2/src/main/org/h2/expression/package.html
浏览文件 @
c7038923
...
...
@@ -9,6 +9,6 @@ Initial Developer: H2 Group
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
Expressions include mathematical operations, conditions, simple values, and
function
s.
Expressions include mathematical operations, conditions, simple values, and
other
s.
</p></body></html>
\ No newline at end of file
h2/src/main/org/h2/mode/FunctionsBase.java
浏览文件 @
c7038923
...
...
@@ -8,8 +8,8 @@ package org.h2.mode;
import
java.util.HashMap
;
import
org.h2.engine.Database
;
import
org.h2.expression.Function
;
import
org.h2.expression.FunctionInfo
;
import
org.h2.expression.
function.
Function
;
import
org.h2.expression.
function.
FunctionInfo
;
/**
* Base class for mode-specific functions.
...
...
h2/src/main/org/h2/mode/FunctionsMSSQLServer.java
浏览文件 @
c7038923
...
...
@@ -8,8 +8,8 @@ package org.h2.mode;
import
java.util.HashMap
;
import
org.h2.engine.Database
;
import
org.h2.expression.Function
;
import
org.h2.expression.FunctionInfo
;
import
org.h2.expression.
function.
Function
;
import
org.h2.expression.
function.
FunctionInfo
;
/**
* Functions for {@link org.h2.engine.Mode.ModeEnum#MSSQLServer} compatibility
...
...
h2/src/main/org/h2/mode/FunctionsMySQL.java
浏览文件 @
c7038923
...
...
@@ -14,9 +14,9 @@ import org.h2.api.ErrorCode;
import
org.h2.engine.Database
;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
import
org.h2.expression.Function
;
import
org.h2.expression.FunctionInfo
;
import
org.h2.expression.ValueExpression
;
import
org.h2.expression.function.Function
;
import
org.h2.expression.function.FunctionInfo
;
import
org.h2.message.DbException
;
import
org.h2.util.StringUtils
;
import
org.h2.value.DataType
;
...
...
h2/src/main/org/h2/mvstore/MVStore.java
浏览文件 @
c7038923
...
...
@@ -1538,7 +1538,7 @@ public class MVStore {
}
}
private
void
registerChunk
(
int
chunkId
)
{
void
registerChunk
(
int
chunkId
)
{
if
(
referencedChunks
.
put
(
chunkId
,
1
)
==
null
&&
parent
!=
null
)
{
parent
.
registerChunk
(
chunkId
);
}
...
...
h2/src/main/org/h2/table/FunctionTable.java
浏览文件 @
c7038923
...
...
@@ -9,8 +9,8 @@ import java.util.ArrayList;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
import
org.h2.expression.FunctionCall
;
import
org.h2.expression.TableFunction
;
import
org.h2.expression.
function.
FunctionCall
;
import
org.h2.expression.
function.
TableFunction
;
import
org.h2.index.FunctionIndex
;
import
org.h2.index.Index
;
import
org.h2.index.IndexType
;
...
...
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
c7038923
...
...
@@ -46,6 +46,8 @@ import org.h2.api.Aggregate;
import
org.h2.api.AggregateFunction
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Constants
;
import
org.h2.expression.function.ToDateParser
;
import
org.h2.expression.function.ToChar.Capitalization
;
import
org.h2.message.DbException
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestBase
;
...
...
@@ -55,8 +57,6 @@ import org.h2.tools.SimpleResultSet;
import
org.h2.util.DateTimeUtils
;
import
org.h2.util.IOUtils
;
import
org.h2.util.StringUtils
;
import
org.h2.util.ToChar.Capitalization
;
import
org.h2.util.ToDateParser
;
import
org.h2.value.Value
;
import
org.h2.value.ValueTimestamp
;
import
org.h2.value.ValueTimestampTimeZone
;
...
...
h2/src/test/org/h2/test/unit/TestClearReferences.java
浏览文件 @
c7038923
...
...
@@ -26,6 +26,8 @@ public class TestClearReferences extends TestBase {
"org.h2.compress.CompressLZF.cachedHashTable"
,
"org.h2.engine.DbSettings.defaultSettings"
,
"org.h2.engine.SessionRemote.sessionFactory"
,
"org.h2.expression.function.DateTimeFunctions.MONTHS_AND_WEEKS"
,
"org.h2.expression.function.ToChar.NAMES"
,
"org.h2.jdbcx.JdbcDataSourceFactory.cachedTraceSystem"
,
"org.h2.store.RecoverTester.instance"
,
"org.h2.store.fs.FilePath.defaultProvider"
,
...
...
@@ -36,7 +38,6 @@ public class TestClearReferences extends TestBase {
"org.h2.tools.CompressTool.cachedBuffer"
,
"org.h2.util.CloseWatcher.queue"
,
"org.h2.util.CloseWatcher.refs"
,
"org.h2.util.DateTimeFunctions.MONTHS_AND_WEEKS"
,
"org.h2.util.DateTimeUtils.timeZone"
,
"org.h2.util.MathUtils.cachedSecureRandom"
,
"org.h2.util.NetUtils.cachedLocalAddress"
,
...
...
@@ -45,7 +46,6 @@ public class TestClearReferences extends TestBase {
"org.h2.util.JdbcUtils.allowedClassNamePrefixes"
,
"org.h2.util.JdbcUtils.userClassFactories"
,
"org.h2.util.Task.counter"
,
"org.h2.util.ToChar.NAMES"
,
"org.h2.value.CompareMode.lastUsed"
,
"org.h2.value.Value.softCache"
,
};
...
...
h2/src/test/org/h2/test/unit/TestStringUtils.java
浏览文件 @
c7038923
...
...
@@ -10,10 +10,10 @@ import java.net.URLDecoder;
import
java.net.URLEncoder
;
import
java.util.Date
;
import
java.util.Random
;
import
org.h2.expression.function.DateTimeFunctions
;
import
org.h2.message.DbException
;
import
org.h2.test.TestBase
;
import
org.h2.test.utils.AssertThrows
;
import
org.h2.util.DateTimeFunctions
;
import
org.h2.util.StringUtils
;
/**
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论