getExecutor returns the appropriate executor (transaction or pool)
(tx pgx.Tx)
| 31 | |
| 32 | // getExecutor returns the appropriate executor (transaction or pool) |
| 33 | func (db *PostgreSQL) getExecutor(tx pgx.Tx) Executor { |
| 34 | if tx != nil { |
| 35 | return tx |
| 36 | } |
| 37 | return db.pool |
| 38 | } |
| 39 | |
| 40 | // NewPostgreSQL creates a new instance of the PostgreSQL database |
| 41 | func NewPostgreSQL(ctx context.Context, connectionURI string) (*PostgreSQL, error) { |
no outgoing calls
no test coverage detected