Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
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
wangpeng
dinky
Commits
f9062e27
Unverified
Commit
f9062e27
authored
Nov 04, 2022
by
zzzzzzzs
Committed by
GitHub
Nov 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CDCSOURCE automatically creates MySQL tables to handle double quotes (#1201)
parent
7a4bf38b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
MySqlDriver.java
.../src/main/java/com/dlink/metadata/driver/MySqlDriver.java
+5
-7
No files found.
dlink-metadata/dlink-metadata-mysql/src/main/java/com/dlink/metadata/driver/MySqlDriver.java
View file @
f9062e27
...
@@ -93,14 +93,12 @@ public class MySqlDriver extends AbstractJdbcDriver {
...
@@ -93,14 +93,12 @@ public class MySqlDriver extends AbstractJdbcDriver {
}
else
if
(
null
!=
column
.
getLength
())
{
// 处理字符串类型和数值型
}
else
if
(
null
!=
column
.
getLength
())
{
// 处理字符串类型和数值型
sb
.
append
(
"("
).
append
(
column
.
getLength
()).
append
(
")"
);
sb
.
append
(
"("
).
append
(
column
.
getLength
()).
append
(
")"
);
}
}
if
(
Asserts
.
isNotNull
(
column
.
getCharacterSet
()))
{
sb
.
append
(
" CHARACTER SET "
).
append
(
column
.
getCharacterSet
());
}
if
(
Asserts
.
isNotNull
(
column
.
getCollation
()))
{
sb
.
append
(
" COLLATE "
).
append
(
column
.
getCollation
());
}
if
(
Asserts
.
isNotNull
(
column
.
getDefaultValue
()))
{
if
(
Asserts
.
isNotNull
(
column
.
getDefaultValue
()))
{
sb
.
append
(
" DEFAULT "
).
append
(
column
.
getDefaultValue
());
if
(
""
.
equals
(
column
.
getDefaultValue
()))
{
sb
.
append
(
" DEFAULT "
).
append
(
"\"\""
);
}
else
{
sb
.
append
(
" DEFAULT "
).
append
(
column
.
getDefaultValue
());
}
}
else
{
}
else
{
if
(!
column
.
isNullable
())
{
if
(!
column
.
isNullable
())
{
sb
.
append
(
" NOT "
);
sb
.
append
(
" NOT "
);
...
...
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