Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
ba3abad0
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ba3abad0
编写于
4月 15, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#3294 RSV dictionary read fix: include NULL values
Former-commit-id:
2093e2ce
上级
8ce1603b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
26 addition
and
20 deletion
+26
-20
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/valuefilter/GenericFilterValueEdit.java
...ontrols/resultset/valuefilter/GenericFilterValueEdit.java
+11
-12
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/virtual/DBVUtils.java
...r.model/src/org/jkiss/dbeaver/model/virtual/DBVUtils.java
+15
-8
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/valuefilter/GenericFilterValueEdit.java
浏览文件 @
ba3abad0
...
...
@@ -80,8 +80,8 @@ class GenericFilterValueEdit {
private
boolean
isCheckedTable
;
p
ublic
static
final
int
MAX_MULTI_VALUES
=
1000
;
p
ublic
static
final
String
MULTI_KEY_LABEL
=
"..."
;
p
rivate
static
final
int
MAX_MULTI_VALUES
=
1000
;
p
rivate
static
final
String
MULTI_KEY_LABEL
=
"..."
;
GenericFilterValueEdit
(
@NotNull
ResultSetViewer
viewer
,
@NotNull
DBDAttributeBinding
attr
,
@NotNull
ResultSetRow
[]
rows
,
@NotNull
DBCLogicalOperator
operator
)
{
...
...
@@ -126,15 +126,12 @@ class GenericFilterValueEdit {
// Create filter text
final
Text
valueFilterText
=
new
Text
(
composite
,
SWT
.
BORDER
);
valueFilterText
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
valueFilterText
.
addModifyListener
(
new
ModifyListener
()
{
@Override
public
void
modifyText
(
ModifyEvent
e
)
{
filterPattern
=
valueFilterText
.
getText
();
if
(
filterPattern
.
isEmpty
())
{
filterPattern
=
null
;
}
loadValues
();
valueFilterText
.
addModifyListener
(
e
->
{
filterPattern
=
valueFilterText
.
getText
();
if
(
filterPattern
.
isEmpty
())
{
filterPattern
=
null
;
}
loadValues
();
});
return
valueFilterText
;
}
...
...
@@ -155,7 +152,7 @@ class GenericFilterValueEdit {
}
else
if
(
attr
.
getEntityAttribute
()
instanceof
DBSAttributeEnumerable
)
{
loadAttributeEnum
((
DBSAttributeEnumerable
)
attr
.
getEntityAttribute
());
}
else
{
loadMultiValueList
(
Collections
.
<
DBDLabelValuePair
>
emptyList
());
loadMultiValueList
(
Collections
.
emptyList
());
}
}
...
...
@@ -259,7 +256,9 @@ class GenericFilterValueEdit {
}
Collections
.
sort
(
sortedList
);
if
(
hasNulls
)
{
sortedList
.
add
(
0
,
new
DBDLabelValuePair
(
DBValueFormatting
.
getDefaultValueDisplayString
(
null
,
DBDDisplayFormat
.
UI
),
null
));
if
(!
rowData
.
containsKey
(
null
))
{
sortedList
.
add
(
0
,
new
DBDLabelValuePair
(
DBValueFormatting
.
getDefaultValueDisplayString
(
null
,
DBDDisplayFormat
.
UI
),
null
));
}
}
Set
<
Object
>
checkedValues
=
new
HashSet
<>();
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/virtual/DBVUtils.java
浏览文件 @
ba3abad0
...
...
@@ -57,7 +57,7 @@ public abstract class DBVUtils {
}
@Nullable
p
ublic
static
DBVTransformSettings
getTransformSettings
(
@NotNull
DBVEntityAttribute
attribute
,
boolean
create
)
{
p
rivate
static
DBVTransformSettings
getTransformSettings
(
@NotNull
DBVEntityAttribute
attribute
,
boolean
create
)
{
if
(
attribute
.
getTransformSettings
()
!=
null
)
{
return
attribute
.
getTransformSettings
();
}
else
if
(
create
)
{
...
...
@@ -161,6 +161,7 @@ public abstract class DBVUtils {
for
(
DBCAttributeMetaData
col
:
metaColumns
)
{
colHandlers
.
add
(
DBUtils
.
findValueHandler
(
session
,
col
));
}
boolean
hasNulls
=
false
;
// Extract enumeration values and (optionally) their descriptions
while
(
dbResult
.
nextRow
())
{
// Check monitor
...
...
@@ -169,19 +170,25 @@ public abstract class DBVUtils {
}
// Get value and description
Object
keyValue
=
valueHandler
.
fetchValueObject
(
session
,
dbResult
,
valueAttribute
,
0
);
if
(
keyValue
==
null
)
{
continue
;
if
(
DBUtils
.
isNullValue
(
keyValue
))
{
if
(
hasNulls
)
{
continue
;
}
hasNulls
=
true
;
}
String
keyLabel
=
valueHandler
.
getValueDisplayString
(
valueAttribute
,
keyValue
,
DBDDisplayFormat
.
NATIVE
)
;
String
keyLabel
;
if
(
metaColumns
.
size
()
>
1
)
{
keyLabel
=
""
;
StringBuilder
keyLabel2
=
new
StringBuilder
()
;
for
(
int
i
=
1
;
i
<
colHandlers
.
size
();
i
++)
{
Object
descValue
=
colHandlers
.
get
(
i
).
fetchValueObject
(
session
,
dbResult
,
metaColumns
.
get
(
i
),
i
);
if
(
!
keyLabel
.
isEmpty
()
)
{
keyLabel
+=
" "
;
if
(
keyLabel2
.
length
()
>
0
)
{
keyLabel
2
.
append
(
" "
)
;
}
keyLabel
+=
colHandlers
.
get
(
i
).
getValueDisplayString
(
metaColumns
.
get
(
i
),
descValue
,
DBDDisplayFormat
.
NATIVE
);
keyLabel
2
.
append
(
colHandlers
.
get
(
i
).
getValueDisplayString
(
metaColumns
.
get
(
i
),
descValue
,
DBDDisplayFormat
.
NATIVE
)
);
}
keyLabel
=
keyLabel2
.
toString
();
}
else
{
keyLabel
=
valueHandler
.
getValueDisplayString
(
valueAttribute
,
keyValue
,
DBDDisplayFormat
.
NATIVE
);
}
values
.
add
(
new
DBDLabelValuePair
(
keyLabel
,
keyValue
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录