Documentation
¶
Overview ¶
postgres_plugin.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyPluginContext ¶
ApplyPluginContext sets session variables using set_config for all keys in ctx. For each key, it sets two variables: one with prefix "request." (complex types are marshaled to JSON) and one with prefix "erctx." using the default string representation. Keys are processed in sorted order.
func NewPgCachePlugin ¶
func NewPgCachePlugin() *pgCachePlugin
func NewPgPlugin ¶
func NewPgPlugin() *pgPlugin
Types ¶
type DBPool ¶
type DBPool interface {
Begin(ctx context.Context) (pgx.Tx, error)
Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)
Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
}
DBPool abstracts pgxpool.Pool and pgxmock.PgxPoolIface for production and testing Only the methods used in pgPlugin are included
Click to show internal directories.
Click to hide internal directories.