Documentation
¶
Overview ¶
Package stmtcache provides a cache for prepared statements.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[T comparable] struct { // contains filtered or unexported fields }
Cache holds prepared statements which are retrieved by a comparable key. Since prepared statements may have a non-trivial cost or be a limited resource in the target database, so we want the Cache to have a one-to-one lifetime with the underlying database pool.
func (*Cache[T]) Diagnostic ¶
Diagnostic implements [diag.Diagnostic]. It returns the capacity and size of the cache.
Click to show internal directories.
Click to hide internal directories.