Fix time bug
This commit is contained in:
parent
c7f3c3cae9
commit
b11dd70c3c
|
@ -176,12 +176,7 @@ func (statement *Statement) GenInsertSQL(colNames []string, args []interface{})
|
|||
if err := statement.dialect.Quoter().QuoteTo(buf.Builder, table.AutoIncrement); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} /* else if statement.dialect.URI().DBType == schemas.ORACLE {
|
||||
if _, err := buf.WriteString(fmt.Sprintf("; select %s.currval from dual",
|
||||
dialects.OracleSeqName(tableName))); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
return buf, nil
|
||||
|
|
|
@ -512,7 +512,11 @@ func (session *Session) genInsertColumns(bean interface{}) ([]string, []interfac
|
|||
return nil, nil, err
|
||||
}
|
||||
if session.engine.dialect.URI().DBType == schemas.ORACLE {
|
||||
args = append(args, t)
|
||||
if col.SQLType.IsNumeric() {
|
||||
args = append(args, t.Unix())
|
||||
} else {
|
||||
args = append(args, t)
|
||||
}
|
||||
} else {
|
||||
args = append(args, val)
|
||||
}
|
||||
|
|
|
@ -220,7 +220,11 @@ func (session *Session) Update(bean interface{}, condiBean ...interface{}) (int6
|
|||
return 0, err
|
||||
}
|
||||
if session.engine.dialect.URI().DBType == schemas.ORACLE {
|
||||
args = append(args, t)
|
||||
if col.SQLType.IsNumeric() {
|
||||
args = append(args, t.Unix())
|
||||
} else {
|
||||
args = append(args, t)
|
||||
}
|
||||
} else {
|
||||
args = append(args, val)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue