parent
4fec1167de
commit
d92dc9d373
|
@ -2204,12 +2204,12 @@ func (session *Session) innerInsertMulti(rowsSlicePtr interface{}) (int64, error
|
|||
continue
|
||||
}
|
||||
if session.Statement.ColumnStr != "" {
|
||||
if _, ok := session.Statement.columnMap[col.Name]; !ok {
|
||||
if _, ok := session.Statement.columnMap[strings.ToLower(col.Name)]; !ok {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if session.Statement.OmitStr != "" {
|
||||
if _, ok := session.Statement.columnMap[col.Name]; ok {
|
||||
if _, ok := session.Statement.columnMap[strings.ToLower(col.Name)]; ok {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
@ -2252,12 +2252,12 @@ func (session *Session) innerInsertMulti(rowsSlicePtr interface{}) (int64, error
|
|||
continue
|
||||
}
|
||||
if session.Statement.ColumnStr != "" {
|
||||
if _, ok := session.Statement.columnMap[col.Name]; !ok {
|
||||
if _, ok := session.Statement.columnMap[strings.ToLower(col.Name)]; !ok {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if session.Statement.OmitStr != "" {
|
||||
if _, ok := session.Statement.columnMap[col.Name]; ok {
|
||||
if _, ok := session.Statement.columnMap[strings.ToLower(col.Name)]; ok {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
|
@ -867,7 +867,8 @@ func (statement *Statement) Cols(columns ...string) *Statement {
|
|||
}
|
||||
statement.ColumnStr = statement.Engine.Quote(strings.Join(newColumns, statement.Engine.Quote(", ")))
|
||||
if strings.Contains(statement.ColumnStr, ".") {
|
||||
statement.ColumnStr = strings.Replace(statement.ColumnStr, ".", statement.Engine.Quote("."), -1)
|
||||
statement.ColumnStr = strings.Replace(statement.ColumnStr, ".",
|
||||
statement.Engine.dialect.QuoteStr()+"."+statement.Engine.dialect.QuoteStr(), -1)
|
||||
}
|
||||
statement.ColumnStr = strings.Replace(statement.ColumnStr, statement.Engine.Quote("*"), "*", -1)
|
||||
return statement
|
||||
|
|
Loading…
Reference in New Issue