MCPcopy
hub / github.com/modelcontextprotocol/registry / getExecutor

Method getExecutor

internal/database/postgres.go:33–38  ·  view source on GitHub ↗

getExecutor returns the appropriate executor (transaction or pool)

(tx pgx.Tx)

Source from the content-addressed store, hash-verified

31
32// getExecutor returns the appropriate executor (transaction or pool)
33func (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
41func NewPostgreSQL(ctx context.Context, connectionURI string) (*PostgreSQL, error) {

Callers 14

ListServersMethod · 0.95
GetServerByNameMethod · 0.95
CreateServerMethod · 0.95
UpdateServerMethod · 0.95
SetServerStatusMethod · 0.95
SetAllVersionsStatusMethod · 0.95
AcquirePublishLockMethod · 0.95
CountServerVersionsMethod · 0.95
CheckVersionExistsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected