Merge 856c9711a7
into 33fc33b2f5
This commit is contained in:
commit
8bdf570f0f
|
@ -92,11 +92,15 @@ func (engine *Engine) BufferSize(size int) *Session {
|
||||||
|
|
||||||
// CondDeleted returns the conditions whether a record is soft deleted.
|
// CondDeleted returns the conditions whether a record is soft deleted.
|
||||||
func (engine *Engine) CondDeleted(colName string) builder.Cond {
|
func (engine *Engine) CondDeleted(colName string) builder.Cond {
|
||||||
if engine.dialect.DBType() == core.MSSQL {
|
switch engine.dialect.DBType() {
|
||||||
|
case core.MSSQL:
|
||||||
return builder.IsNull{colName}
|
return builder.IsNull{colName}
|
||||||
}
|
case core.POSTGRES:
|
||||||
|
return builder.IsNull{colName}
|
||||||
|
default:
|
||||||
return builder.IsNull{colName}.Or(builder.Eq{colName: zeroTime1})
|
return builder.IsNull{colName}.Or(builder.Eq{colName: zeroTime1})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ShowSQL show SQL statement or not on logger if log level is great than INFO
|
// ShowSQL show SQL statement or not on logger if log level is great than INFO
|
||||||
func (engine *Engine) ShowSQL(show ...bool) {
|
func (engine *Engine) ShowSQL(show ...bool) {
|
||||||
|
|
Loading…
Reference in New Issue