Source File
stmtcache.go
Belonging Package
github.com/jackc/pgconn/stmtcache
package stmtcache
import (
)
const (
ModePrepare = iota // Cache should prepare named statements.
ModeDescribe // Cache should prepare the anonymous prepared statement to only fetch the description of the statement.
)
Len() int
Cap() int
Mode() int
}
func ( *pgconn.PgConn, int, int) Cache {
mustBeValidMode()
mustBeValidCap()
return NewLRU(, , )
}
func ( int) {
if != ModePrepare && != ModeDescribe {
panic("mode must be ModePrepare or ModeDescribe")
}
}
func ( int) {
if < 1 {
panic("cache must have cap of >= 1")
}
![]() |
The pages are generated with Golds v0.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. |