2
0

StatementErrored does not need context nor return an error

This commit is contained in:
Jack Christensen
2020-11-11 15:52:59 -06:00
parent 426124b32f
commit cba610c245
3 changed files with 11 additions and 20 deletions
+4 -6
View File
@@ -21,12 +21,10 @@ type Cache interface {
Clear(ctx context.Context) error
// StatementErrored informs the cache that the given statement resulted in an error when it
// was last used against the database. In some cases, this will cause the cache to flush
// the statement from the cache. It will only do so when the underlying `*pgconn.PgConn`
// is not currently in a transaction. If the connection is in the middle of a transaction,
// the bad statement will instead be flushed during the next call to Get that occurrs outside
// of a transaction.
StatementErrored(ctx context.Context, sql string, err error) error
// was last used against the database. In some cases, this will cause the cache to maer that
// statement as bad. The bad statement will instead be flushed during the next call to Get
// that occurs outside of a failed transaction.
StatementErrored(sql string, err error)
// Len returns the number of cached prepared statement descriptions.
Len() int