invalidates statement and description caches on batch results error
(conn *Conn, b *Batch, err error)
| 493 | |
| 494 | // invalidates statement and description caches on batch results error |
| 495 | func invalidateCachesOnBatchResultsError(conn *Conn, b *Batch, err error) { |
| 496 | if err != nil && conn != nil && b != nil { |
| 497 | if sc := conn.statementCache; sc != nil { |
| 498 | for _, bi := range b.QueuedQueries { |
| 499 | sc.Invalidate(bi.SQL) |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | if sc := conn.descriptionCache; sc != nil { |
| 504 | for _, bi := range b.QueuedQueries { |
| 505 | sc.Invalidate(bi.SQL) |
| 506 | } |
| 507 | } |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | // ErrPreprocessingBatch occurs when an error is encountered while preprocessing a batch. |
| 512 | // The two preprocessing steps are "prepare" (server-side SQL parse/plan) and |
no test coverage detected