MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / getConnection

Function getConnection

plugins/destination/postgresql/client/client_test.go:31–38  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

29}
30
31func getConnection(ctx context.Context) (*pgxpool.Pool, error) {
32 pgxConfig, err := pgxpool.ParseConfig(getTestConnection())
33 if err != nil {
34 return nil, fmt.Errorf("failed to parse connection string %w", err)
35 }
36 pgxConfig.ConnConfig.RuntimeParams["timezone"] = "UTC"
37 return pgxpool.NewWithConfig(ctx, pgxConfig)
38}
39
40func getIndexesForTable(ctx context.Context, tableName string) (map[string]string, error) {
41 conn, err := getConnection(ctx)

Callers 3

getIndexesForTableFunction · 0.85
isPostgresDBFunction · 0.85

Calls 2

ErrorfMethod · 0.80
getTestConnectionFunction · 0.70

Tested by

no test coverage detected