Skip to content

Commit

Permalink
Add Pre/Post functions to godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
umisama authored and James Cooper committed May 14, 2014
1 parent f1c93ef commit b795354
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gorp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit b795354

Please sign in to comment.