Versions in this module Expand all Collapse all v1 v1.0.0 Sep 14, 2026 Changes in this version + var ErrQueryRewriterUnsupported = errors.New("sqlguard pgx-prepared example: query rewriting is unsupported") + type CacheOptions struct + Capacity int + MaxSQLBytes int + type Executor interface + Exec func(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error) + Query func(ctx context.Context, sql string, args ...any) (pgx.Rows, error) + QueryRow func(ctx context.Context, sql string, args ...any) pgx.Row + type GuardedDB struct + func NewGuardedDB(validator PreparedValidator, executor Executor, options CacheOptions) (*GuardedDB, error) + func (db *GuardedDB) Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error) + func (db *GuardedDB) Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error) + func (db *GuardedDB) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row + type PreparedValidator interface + Prepare func(context.Context, string) (sqlguard.Prepared, error) + ValidatePrepared func(context.Context, sqlguard.Prepared) error