diff --git a/engine.go b/engine.go index 645891b6..fb19176e 100644 --- a/engine.go +++ b/engine.go @@ -1241,6 +1241,7 @@ func (engine *Engine) Delete(beans ...interface{}) (int64, error) { } // 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) { session := engine.NewSession() defer session.Close() diff --git a/session_delete.go b/session_delete.go index 1031d08e..d36b9e52 100644 --- a/session_delete.go +++ b/session_delete.go @@ -97,6 +97,7 @@ func (session *Session) Delete(beans ...interface{}) (int64, error) { } // 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) { return session.delete(beans, false) }