Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
common
Project
Project
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
曲欣亮
common
Commits
20484ee4
Commit
20484ee4
authored
Jun 02, 2020
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
56410421
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
SqlServerTo.java
src/main/java/com/egolm/common/jdbc/dialect/SqlServerTo.java
+9
-2
No files found.
src/main/java/com/egolm/common/jdbc/dialect/SqlServerTo.java
View file @
20484ee4
...
...
@@ -8,6 +8,8 @@ import java.sql.SQLException;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.egolm.common.StringUtil
;
/**
* 数据库工具类
*
...
...
@@ -68,14 +70,19 @@ public class SqlServerTo {
}
}
public
void
execute
Filter
(
String
sign
)
{
public
void
execute
(
String
...
filters
)
{
try
{
String
sql
=
"SELECT D.name AS TABLE_NAME, 'REMARK' AS TABLE_COMMENT FROM sysobjects AS D WHERE D.XTYPE = 'U' AND D.NAME <> 'dtproperties'"
;
PreparedStatement
pStemt
=
conn
.
prepareStatement
(
sql
);
ResultSet
set
=
pStemt
.
executeQuery
();
while
(
set
.
next
())
{
String
name
=
set
.
getString
(
"TABLE_NAME"
).
trim
();
if
(
name
.
contains
(
sign
))
{
if
(
filters
!=
null
&&
filters
.
length
>
0
)
{
if
(
StringUtil
.
contains
(
filters
,
name
))
{
String
comment
=
set
.
getString
(
"TABLE_COMMENT"
);
execute
(
name
,
comment
);
}
}
else
{
String
comment
=
set
.
getString
(
"TABLE_COMMENT"
);
execute
(
name
,
comment
);
}
...
...
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