Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
b5c947e5
提交
b5c947e5
authored
1月 26, 2018
作者:
thomasmueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Javadocs
上级
d64f8cd9
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
49 行增加
和
2 行删除
+49
-2
Select.java
h2/src/main/org/h2/command/dml/Select.java
+39
-1
Value.java
h2/src/main/org/h2/value/Value.java
+1
-0
ValueLob.java
h2/src/main/org/h2/value/ValueLob.java
+9
-1
没有找到文件。
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
b5c947e5
...
...
@@ -47,16 +47,40 @@ public class Select extends Query {
TableFilter
topTableFilter
;
private
final
ArrayList
<
TableFilter
>
filters
=
New
.
arrayList
();
private
final
ArrayList
<
TableFilter
>
topFilters
=
New
.
arrayList
();
/**
* The column list, including synthetic columns (columns not shown in the
* result).
*/
ArrayList
<
Expression
>
expressions
;
private
Expression
[]
expressionArray
;
private
Expression
having
;
private
Expression
condition
;
int
visibleColumnCount
,
distinctColumnCount
;
/**
* The visible columns (the ones required in the result).
*/
int
visibleColumnCount
;
private
int
distinctColumnCount
;
private
ArrayList
<
SelectOrderBy
>
orderList
;
private
ArrayList
<
Expression
>
group
;
/**
* The indexes of the group-by columns.
*/
int
[]
groupIndex
;
/**
* Whether a column in the expression list is part of a group-by.
*/
boolean
[]
groupByExpression
;
/**
* Thhe current group-by values.
*/
HashMap
<
Expression
,
Object
>
currentGroup
;
private
int
havingIndex
;
private
boolean
isGroupQuery
,
isGroupSortedQuery
;
private
boolean
isForUpdate
,
isForUpdateMvcc
;
...
...
@@ -65,6 +89,10 @@ public class Select extends Query {
private
boolean
isPrepared
,
checkInit
;
private
boolean
sortUsingIndex
;
private
SortOrder
sort
;
/**
* The id of the current group.
*/
int
currentGroupRowId
;
public
Select
(
Session
session
)
{
...
...
@@ -165,6 +193,13 @@ public class Select extends Query {
return
null
;
}
/**
* Create a row with the current values, for queries with group-sort.
*
* @param keyValues the key values
* @param columnCount the number of columns
* @return the row
*/
Value
[]
createGroupSortedRow
(
Value
[]
keyValues
,
int
columnCount
)
{
Value
[]
row
=
new
Value
[
columnCount
];
for
(
int
j
=
0
;
groupIndex
!=
null
&&
j
<
groupIndex
.
length
;
j
++)
{
...
...
@@ -632,6 +667,9 @@ public class Select extends Query {
return
null
;
}
/**
* Reset the batch-join after the query result is closed.
*/
void
resetJoinBatchAfterQuery
()
{
JoinBatch
jb
=
getJoinBatch
();
if
(
jb
!=
null
)
{
...
...
h2/src/main/org/h2/value/Value.java
浏览文件 @
b5c947e5
...
...
@@ -614,6 +614,7 @@ public abstract class Value {
* @param precision the precision of the column to convert this value to.
* The special constant <code>-1</code> is used to indicate that
* the precision plays no role when converting the value
* @param mode the conversion mode
* @param column the column that contains the ENUM datatype enumerators,
* for dealing with ENUM conversions
* @param mode the database mode
...
...
h2/src/main/org/h2/value/ValueLob.java
浏览文件 @
b5c947e5
...
...
@@ -62,7 +62,7 @@ public class ValueLob extends Value {
/**
* Create an input stream that is s subset of the given stream.
*
* @param inputStream the input stream
* @param inputStream the
source
input stream
* @param oneBasedOffset the offset (1 means no offset)
* @param length the length of the result, in bytes
* @param dataSize the length of the input, in bytes
...
...
@@ -83,11 +83,19 @@ public class ValueLob extends Value {
/**
* Create a reader that is s subset of the given reader.
*
<<<<<<< Updated upstream
* @param reader the input reader
* @param oneBasedOffset the offset (1 means no offset)
* @param length the length of the result, in bytes
* @param dataSize the length of the input, in bytes
* @return the smaller input stream
=======
* @param reader the source reader
* @param oneBasedOffset the offset (1 means no offset)
* @param length the length of the result, in characters
* @param dataSize the length of the input, in characters
* @return the smaller reader
>>>>>>> Stashed changes
*/
static
Reader
rangeReader
(
Reader
reader
,
long
oneBasedOffset
,
long
length
,
long
dataSize
)
{
if
(
dataSize
>
0
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论