(ctx context.Context)
| 29 | } |
| 30 | |
| 31 | func 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 | |
| 40 | func getIndexesForTable(ctx context.Context, tableName string) (map[string]string, error) { |
| 41 | conn, err := getConnection(ctx) |
no test coverage detected