Documentation ¶
Index ¶
- func NewCardRepository(connection *DBConnection, cfg config.Images) cards.CardRepository
- func NewCollectionRepository(connection *DBConnection, cfg config.Images) cards.CollectionRepository
- func NewDetectRepository(connection *DBConnection, cfg config.Images) cards.DetectRepository
- type DBConn
- type DBConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCardRepository ¶
func NewCardRepository(connection *DBConnection, cfg config.Images) cards.CardRepository
func NewCollectionRepository ¶
func NewCollectionRepository(connection *DBConnection, cfg config.Images) cards.CollectionRepository
func NewDetectRepository ¶
func NewDetectRepository(connection *DBConnection, cfg config.Images) cards.DetectRepository
Types ¶
type DBConn ¶
type DBConn interface { Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error) Query(ctx context.Context, sql string, optionsAndArgs ...interface{}) (pgx.Rows, error) QueryRow(ctx context.Context, sql string, optionsAndArgs ...interface{}) pgx.Row }
DBConn implemented by pgx.Conn and pgx.Tx.
type DBConnection ¶
type DBConnection struct { Conn DBConn // contains filtered or unexported fields }
func (*DBConnection) Close ¶
func (d *DBConnection) Close() error
func (*DBConnection) WithTransaction ¶
func (d *DBConnection) WithTransaction(ctx context.Context, f func(conn *DBConnection) error) error
Click to show internal directories.
Click to hide internal directories.