From b7953545f3151ddda68fe6914614e8524f5c1e7f Mon Sep 17 00:00:00 2001 From: umisama Date: Mon, 17 Mar 2014 19:35:29 +0900 Subject: [PATCH] Add Pre/Post functions to godoc --- gorp.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gorp.go b/gorp.go index 2a3ccca7..4c08b494 100644 --- a/gorp.go +++ b/gorp.go @@ -1889,30 +1889,37 @@ func lockError(m *DbMap, exec SqlExecutor, tableName string, return -1, ole } +// PostUpdate() will be executed after the GET statement. type HasPostGet interface { PostGet(SqlExecutor) error } +// PostUpdate() will be executed after the DELETE statement type HasPostDelete interface { PostDelete(SqlExecutor) error } +// PostUpdate() will be executed after the UPDATE statement type HasPostUpdate interface { PostUpdate(SqlExecutor) error } +// PostInsert() will be executed after the INSERT statement type HasPostInsert interface { PostInsert(SqlExecutor) error } +// PreDelete() will be executed before the DELETE statement. type HasPreDelete interface { PreDelete(SqlExecutor) error } +// PreUpdate() will be executed before UPDATE statement. type HasPreUpdate interface { PreUpdate(SqlExecutor) error } +// PreInsert() will be executed before INSERT statement. type HasPreInsert interface { PreInsert(SqlExecutor) error }