NOTE: NewStmtCache is defined in stmtcacher_ctx.go (Go >= 1.8) or stmtcacher_noctx.go (Go < 1.8). StmtCache wraps and delegates down to a Preparer type It also automatically prepares all statements sent to the underlying Preparer calls for Exec, Query and QueryRow and caches the returns *sql.Stmt u
| 29 | // for Exec, Query and QueryRow and caches the returns *sql.Stmt using the provided |
| 30 | // query as the key. So that it can be automatically re-used. |
| 31 | type StmtCache struct { |
| 32 | prep Preparer |
| 33 | cache map[string]*sql.Stmt |
| 34 | mu sync.Mutex |
| 35 | } |
| 36 | |
| 37 | // Prepare delegates down to the underlying Preparer and caches the result |
| 38 | // using the provided query as a key |
nothing calls this directly
no outgoing calls
no test coverage detected