+build go1.8

package squirrel

import (
	
	
)
PrepareerContext is the interface that wraps the Prepare and PrepareContext methods. Prepare executes the given query as implemented by database/sql.Prepare. PrepareContext executes the given query as implemented by database/sql.PrepareContext.
type PreparerContext interface {
	Preparer
	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
}
DBProxyContext groups the Execer, Queryer, QueryRower and PreparerContext interfaces.
NewStmtCache returns a *StmtCache wrapping a PreparerContext that caches Prepared Stmts. Stmts are cached based on the string value of their queries.
func ( PreparerContext) *StmtCache {
	return &StmtCache{prep: , cache: make(map[string]*sql.Stmt)}
}
NewStmtCacher is deprecated Use NewStmtCache instead
PrepareContext delegates down to the underlying PreparerContext and caches the result using the provided query as a key
func ( *StmtCache) ( context.Context,  string) (*sql.Stmt, error) {
	,  := .prep.(PreparerContext)
	if ! {
		return nil, NoContextSupport
	}
	.mu.Lock()
	defer .mu.Unlock()
	,  := .cache[]
	if  {
		return , nil
	}
	,  := .PrepareContext(, )
	if  == nil {
		.cache[] = 
	}
	return , 
}
ExecContext delegates down to the underlying PreparerContext using a prepared statement
func ( *StmtCache) ( context.Context,  string,  ...interface{}) ( sql.Result,  error) {
	,  := .PrepareContext(, )
	if  != nil {
		return
	}
	return .ExecContext(, ...)
}
QueryContext delegates down to the underlying PreparerContext using a prepared statement
func ( *StmtCache) ( context.Context,  string,  ...interface{}) ( *sql.Rows,  error) {
	,  := .PrepareContext(, )
	if  != nil {
		return
	}
	return .QueryContext(, ...)
}
QueryRowContext delegates down to the underlying PreparerContext using a prepared statement
func ( *StmtCache) ( context.Context,  string,  ...interface{}) RowScanner {
	,  := .PrepareContext(, )
	if  != nil {
		return &Row{err: }
	}
	return .QueryRowContext(, ...)