Involved Source Fileslru.go
Package stmtcache is a cache that can be used to implement lazy prepared statements.
Package-Level Type Names (total 2, both are exported)
/* sort exporteds by: | */
Cache prepares and caches prepared statement descriptions.
Cap returns the maximum number of cached prepared statement descriptions.
Clear removes all entries in the cache. Any prepared statements will be deallocated from the PostgreSQL session.
Get returns the prepared statement description for sql preparing or describing the sql on the server as needed.
Len returns the number of cached prepared statement descriptions.
Mode returns the mode of the cache (ModePrepare or ModeDescribe)
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 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.
*LRU
T : github.com/aws/aws-sdk-go/aws/corehandlers.lener
func New(conn *pgconn.PgConn, mode int, cap int) Cache
func github.com/jackc/pgx/v4.(*Conn).StatementCache() Cache
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.