Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
642c24e5
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,发现更多精彩内容 >>
提交
642c24e5
编写于
5月 07, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
QMDB: history reading
上级
7956fca3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
39 addition
and
14 deletion
+39
-14
bundles/org.jkiss.utils/src/org/jkiss/utils/IOUtils.java
bundles/org.jkiss.utils/src/org/jkiss/utils/IOUtils.java
+8
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/querylog/QueryLogViewer.java
...rg/jkiss/dbeaver/ui/controls/querylog/QueryLogViewer.java
+4
-3
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/qm/QMEventCursor.java
...r.model/src/org/jkiss/dbeaver/model/qm/QMEventCursor.java
+3
-8
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/qm/QMUtils.java
...dbeaver.model/src/org/jkiss/dbeaver/model/qm/QMUtils.java
+12
-2
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/qm/meta/QMMSessionInfo.java
...l/src/org/jkiss/dbeaver/model/qm/meta/QMMSessionInfo.java
+12
-1
未找到文件。
bundles/org.jkiss.utils/src/org/jkiss/utils/IOUtils.java
浏览文件 @
642c24e5
...
...
@@ -39,6 +39,14 @@ public final class IOUtils {
}
}
public
static
void
close
(
AutoCloseable
closeable
)
{
try
{
closeable
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
public
static
void
fastCopy
(
final
InputStream
src
,
final
OutputStream
dest
)
throws
IOException
{
fastCopy
(
src
,
dest
,
DEFAULT_BUFFER_SIZE
);
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/querylog/QueryLogViewer.java
浏览文件 @
642c24e5
...
...
@@ -621,9 +621,10 @@ public class QueryLogViewer extends Viewer implements QMMetaListener, DBPPrefere
QMEventBrowser
eventBrowser
=
QMUtils
.
getEventBrowser
();
if
(
eventBrowser
!=
null
)
{
String
searchPattern
=
CommonUtils
.
isEmptyTrimmed
(
searchString
)
?
null
:
searchString
.
trim
();
QMEventCursor
cursor
=
eventBrowser
.
getQueryHistoryCursor
(
monitor
,
null
,
null
,
searchPattern
);
while
(
events
.
size
()
<
this
.
entriesPerPage
&&
cursor
.
hasNextEvent
(
monitor
))
{
events
.
add
(
cursor
.
nextEvent
(
monitor
));
try
(
QMEventCursor
cursor
=
eventBrowser
.
getQueryHistoryCursor
(
monitor
,
null
,
null
,
searchPattern
))
{
while
(
events
.
size
()
<
this
.
entriesPerPage
&&
cursor
.
hasNextEvent
(
monitor
))
{
events
.
add
(
cursor
.
nextEvent
(
monitor
));
}
}
}
}
catch
(
DBException
e
)
{
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/qm/QMEventCursor.java
浏览文件 @
642c24e5
...
...
@@ -17,26 +17,21 @@
package
org.jkiss.dbeaver.model.qm
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.model.exec.DBCExecutionPurpose
;
import
org.jkiss.dbeaver.model.qm.meta.QMMStatementExecuteInfo
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
java.util.Date
;
import
java.util.List
;
/**
* Event cursor
*/
public
interface
QMEventCursor
{
public
interface
QMEventCursor
extends
AutoCloseable
{
long
getTotalSize
();
void
scroll
(
long
position
,
DBRProgressMonitor
monitor
)
throws
DBException
;
void
scroll
(
int
position
,
DBRProgressMonitor
monitor
)
throws
DBException
;
boolean
hasNextEvent
(
DBRProgressMonitor
monitor
)
throws
DBException
;
QMMetaEvent
nextEvent
(
DBRProgressMonitor
monitor
)
throws
DBException
;
void
close
();
}
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/qm/QMUtils.java
浏览文件 @
642c24e5
...
...
@@ -162,7 +162,7 @@ public class QMUtils {
}
@Override
public
void
scroll
(
long
position
,
DBRProgressMonitor
monitor
)
throws
DBException
{
public
void
scroll
(
int
position
,
DBRProgressMonitor
monitor
)
throws
DBException
{
if
(
position
<
0
||
position
>=
events
.
size
())
{
throw
new
DBException
(
"Position is out of range ("
+
getTotalSize
()
+
")"
);
}
...
...
@@ -180,6 +180,11 @@ public class QMUtils {
return
event
;
}
@Override
public
void
close
()
{
}
}
public
static
class
EmptyCursorImpl
implements
QMEventCursor
{
...
...
@@ -190,7 +195,7 @@ public class QMUtils {
}
@Override
public
void
scroll
(
long
position
,
DBRProgressMonitor
monitor
)
throws
DBException
{
public
void
scroll
(
int
position
,
DBRProgressMonitor
monitor
)
throws
DBException
{
throw
new
DBException
(
"Empty cursor"
);
}
...
...
@@ -204,6 +209,11 @@ public class QMUtils {
throw
new
DBException
(
"Empty cursor"
);
}
@Override
public
void
close
()
{
}
}
}
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/qm/meta/QMMSessionInfo.java
浏览文件 @
642c24e5
...
...
@@ -16,6 +16,7 @@
*/
package
org.jkiss.dbeaver.model.qm.meta
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.model.connection.DBPConnectionConfiguration
;
import
org.jkiss.dbeaver.model.exec.*
;
import
org.jkiss.dbeaver.model.sql.SQLDataSource
;
...
...
@@ -29,8 +30,10 @@ public class QMMSessionInfo extends QMMObject {
private
final
String
containerId
;
private
final
String
containerName
;
private
final
String
driverId
;
@Nullable
private
final
DBPConnectionConfiguration
connectionConfiguration
;
private
final
String
contextName
;
@Nullable
private
SQLDialect
sqlDialect
;
private
boolean
transactional
;
...
...
@@ -53,7 +56,15 @@ public class QMMSessionInfo extends QMMObject {
if
(
transactional
)
{
this
.
transaction
=
new
QMMTransactionInfo
(
this
,
null
);
}
//stack = new RuntimeException();
}
public
QMMSessionInfo
(
String
containerId
,
String
containerName
,
String
driverId
,
DBPConnectionConfiguration
connectionConfiguration
,
String
contextName
,
boolean
transactional
)
{
this
.
containerId
=
containerId
;
this
.
containerName
=
containerName
;
this
.
driverId
=
driverId
;
this
.
connectionConfiguration
=
connectionConfiguration
;
this
.
contextName
=
contextName
;
this
.
transactional
=
transactional
;
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录