Add comment.

This commit is contained in:
KN4CK3R 2023-02-19 15:13:14 +00:00
parent 2643312baa
commit da09ed8cb0
2 changed files with 2 additions and 0 deletions

View File

@ -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()

View File

@ -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)
} }