Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datax-cloud
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄营
datax-cloud
Commits
b5d6b5c1
Commit
b5d6b5c1
authored
Jun 19, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0.0项目初始化
parent
4f494223
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
DateHander.java
...rvice/data/factory/sql/console/concurrent/DateHander.java
+5
-1
index.vue
datax-ui/src/views/factory/console/index.vue
+2
-2
No files found.
datax-modules/data-factory-service-parent/data-factory-service-sql-console/src/main/java/cn/datax/service/data/factory/sql/console/concurrent/DateHander.java
View file @
b5d6b5c1
...
...
@@ -30,6 +30,7 @@ public class DateHander extends CallableTemplate<SqlConsoleVo> {
ResultSet
rs
=
null
;
// 将查询数据存储到数据中
List
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
// 存储列名的数组
List
<
String
>
columnList
=
new
LinkedList
<>();
// 新增、修改、删除受影响行数
Integer
updateCount
=
null
;
...
...
@@ -50,12 +51,15 @@ public class DateHander extends CallableTemplate<SqlConsoleVo> {
ResultSetMetaData
rsmd
=
rs
.
getMetaData
();
// 获取列字段的个数
int
colunmCount
=
rsmd
.
getColumnCount
();
for
(
int
i
=
1
;
i
<=
colunmCount
;
i
++)
{
// 获取所有的字段名称
columnList
.
add
(
rsmd
.
getColumnName
(
i
));
}
while
(
rs
.
next
()){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
for
(
int
i
=
1
;
i
<=
colunmCount
;
i
++)
{
// 获取列名
String
columnName
=
rsmd
.
getColumnName
(
i
);
columnList
.
add
(
columnName
);
Object
val
=
null
;
switch
(
rsmd
.
getColumnType
(
i
))
{
case
Types
.
ARRAY
:
...
...
datax-ui/src/views/factory/console/index.vue
View file @
b5d6b5c1
...
...
@@ -117,11 +117,11 @@ export default {
},
runData
()
{
if
(
!
this
.
sqlDataSource
)
{
this
.
$message
.
error
(
"数据源不能为空"
)
this
.
$message
.
error
(
'数据源不能为空'
)
return
}
if
(
!
this
.
sqlText
)
{
this
.
$message
.
error
(
"查询SQL不能为空"
)
this
.
$message
.
error
(
'查询SQL不能为空'
)
return
}
this
.
sqlExecuting
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment