Skip to content

Commit

Permalink
remove escape method
Browse files Browse the repository at this point in the history
  • Loading branch information
cartersz committed May 26, 2022
1 parent e335920 commit 7d7e99b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pkg/loader/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (dml *DML) updateOracleSQL() (sql string, args []interface{}) {
builder.WriteByte(',')
}
arg := dml.Values[name]
fmt.Fprintf(builder, "%s = :%d", escapeName(name), oracleHolderPos)
fmt.Fprintf(builder, "%s = :%d", name, oracleHolderPos)
oracleHolderPos++
args = append(args, arg)
}
Expand Down Expand Up @@ -268,9 +268,9 @@ func (dml *DML) buildOracleWhere(builder *strings.Builder, oracleHolderPos int)
builder.WriteString(" AND ")
}
if wargs[i] == nil || wargs[i] == "" {
builder.WriteString(escapeName(wnames[i]) + " IS NULL")
builder.WriteString(wnames[i] + " IS NULL")
} else {
builder.WriteString(fmt.Sprintf("%s = :%d", dml.processOracleColumn(escapeName(wnames[i])), pOracleHolderPos))
builder.WriteString(fmt.Sprintf("%s = :%d", dml.processOracleColumn(wnames[i]), pOracleHolderPos))
pOracleHolderPos++
args = append(args, wargs[i])
}
Expand Down Expand Up @@ -390,9 +390,9 @@ func (dml *DML) oracleDeleteNewValueSQL() (sql string, args []interface{}) {
builder.WriteString(" AND ")
}
if colValues[i] == nil || colValues[i] == "" {
builder.WriteString(escapeName(colNames[i]) + " IS NULL")
builder.WriteString(colNames[i] + " IS NULL")
} else {
builder.WriteString(fmt.Sprintf("%s = :%d", dml.processOracleColumn(escapeName(colNames[i])), oracleHolderPos))
builder.WriteString(fmt.Sprintf("%s = :%d", dml.processOracleColumn(colNames[i]), oracleHolderPos))
oracleHolderPos++
args = append(args, colValues[i])
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/loader/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func buildColumnList(names []string, destDBType DBType) string {
b.WriteString(",")
}
if destDBType == OracleDB {
b.WriteString(escapeName(name))
b.WriteString(name)
} else {
b.WriteString(quoteName(name))
}
Expand Down

0 comments on commit 7d7e99b

Please sign in to comment.