Add comment.
This commit is contained in:
parent
2643312baa
commit
da09ed8cb0
|
@ -1241,6 +1241,7 @@ func (engine *Engine) Delete(beans ...interface{}) (int64, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Truncate records, bean's non-empty fields are conditions
|
// Truncate records, bean's non-empty fields are conditions
|
||||||
|
// In contrast to Delete this method allows deletes without conditions.
|
||||||
func (engine *Engine) Truncate(beans ...interface{}) (int64, error) {
|
func (engine *Engine) Truncate(beans ...interface{}) (int64, error) {
|
||||||
session := engine.NewSession()
|
session := engine.NewSession()
|
||||||
defer session.Close()
|
defer session.Close()
|
||||||
|
|
|
@ -97,6 +97,7 @@ func (session *Session) Delete(beans ...interface{}) (int64, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Truncate records, bean's non-empty fields are conditions
|
// Truncate records, bean's non-empty fields are conditions
|
||||||
|
// In contrast to Delete this method allows deletes without conditions.
|
||||||
func (session *Session) Truncate(beans ...interface{}) (int64, error) {
|
func (session *Session) Truncate(beans ...interface{}) (int64, error) {
|
||||||
return session.delete(beans, false)
|
return session.delete(beans, false)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue