utils

package
v0.0.0-...-0302d1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcquireConnAndSetIntoContext

func AcquireConnAndSetIntoContext(ctx context.Context, pool *pgxpool.Pool) (context.Context, func(), error)

AcquireConnAndSetIntoContext Acquires a connection from the pool and sets it into the context. Needed to use a single connection for multiple requests.

func ConnFromContext

func ConnFromContext(ctx context.Context) *pgxpool.Conn

ConnFromContext Return connection to db from context.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL