MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / DBPool

Interface DBPool

plugins/destination/postgresql/client/client.go:31–38  ·  view source on GitHub ↗

DBPool is an interface that abstracts the pgxpool.Pool and pgxpool.Conn types for easier fine-grained testing.

Source from the content-addressed store, hash-verified

29
30// DBPool is an interface that abstracts the pgxpool.Pool and pgxpool.Conn types for easier fine-grained testing.
31type DBPool interface {
32 Acquire(ctx context.Context) (*pgxpool.Conn, error)
33 Close()
34 Exec(ctx context.Context, query string, args ...any) (pgconn.CommandTag, error)
35 Query(ctx context.Context, query string, args ...any) (pgx.Rows, error)
36 QueryRow(ctx context.Context, query string, args ...any) pgx.Row
37 SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults
38}
39
40type Client struct {
41 conn DBPool

Implementers 1

MockDBPoolplugins/destination/postgresql/client/

Calls

no outgoing calls

Tested by

no test coverage detected