pr_db

package
v0.0.0-...-c524502 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotificationAccepted     NotificationReceipt = "ACCEPTED"
	NotificationRejected     NotificationReceipt = "REJECTED"
	NotificationSeen         NotificationReceipt = "SEEN"
	NotificationSent         NotificationReceipt = "SENT"
	NotificationFailedToSend NotificationReceipt = "FAILED_TO_SEND"

	NotificationDirectionSent     NotificationDirection = "sent"
	NotificationDirectionReceived NotificationDirection = "received"

	NotificationKindNote      NotificationKind = "note"
	NotificationKindCondition NotificationKind = "condition"
)

Variables

View Source
var LANGUAGE = utils.GetEnv("LANGUAGE", "english")

Functions

This section is empty.

Types

type FieldAllRecords

type FieldAllRecords struct{}

func (*FieldAllRecords) Generate

func (f *FieldAllRecords) Generate(sc cql.SearchClause, queryArgumentIndex int) (string, []any, error)

func (*FieldAllRecords) GetColumn

func (f *FieldAllRecords) GetColumn() string

func (*FieldAllRecords) SetColumn

func (f *FieldAllRecords) SetColumn(column string)

func (*FieldAllRecords) Sort

func (f *FieldAllRecords) Sort() string

type FieldTextArrayContains

type FieldTextArrayContains struct {
	// contains filtered or unexported fields
}

func NewFieldTextArrayContains

func NewFieldTextArrayContains(column string) *FieldTextArrayContains

func (*FieldTextArrayContains) Generate

func (f *FieldTextArrayContains) Generate(sc cql.SearchClause, queryArgumentIndex int) (string, []any, error)

func (*FieldTextArrayContains) GetColumn

func (f *FieldTextArrayContains) GetColumn() string

func (*FieldTextArrayContains) SetColumn

func (f *FieldTextArrayContains) SetColumn(column string)

func (*FieldTextArrayContains) Sort

func (f *FieldTextArrayContains) Sort() string

func (*FieldTextArrayContains) WithFunction

func (f *FieldTextArrayContains) WithFunction(function string) *FieldTextArrayContains

type NotificationDirection

type NotificationDirection string

type NotificationKind

type NotificationKind string

type NotificationReceipt

type NotificationReceipt string

type PatronRequestAction

type PatronRequestAction string

type PatronRequestSide

type PatronRequestSide string

type PatronRequestState

type PatronRequestState string

type PgPrRepo

type PgPrRepo struct {
	repo.PgBaseRepo[PrRepo]
	// contains filtered or unexported fields
}

func (*PgPrRepo) CreatePatronRequest

func (r *PgPrRepo) CreatePatronRequest(ctx common.ExtendedContext, params CreatePatronRequestParams) (PatronRequest, error)

func (*PgPrRepo) CreateWithPgBaseRepo

func (r *PgPrRepo) CreateWithPgBaseRepo(base *repo.PgBaseRepo[PrRepo]) PrRepo

DerivedRepo

func (*PgPrRepo) DeleteItemById

func (r *PgPrRepo) DeleteItemById(ctx common.ExtendedContext, id string) error

func (*PgPrRepo) DeleteNotificationById

func (r *PgPrRepo) DeleteNotificationById(ctx common.ExtendedContext, id string) error

func (*PgPrRepo) DeletePatronRequest

func (r *PgPrRepo) DeletePatronRequest(ctx common.ExtendedContext, id string) error

func (*PgPrRepo) GetItemById

func (r *PgPrRepo) GetItemById(ctx common.ExtendedContext, id string) (Item, error)

func (*PgPrRepo) GetItemsByPrId

func (r *PgPrRepo) GetItemsByPrId(ctx common.ExtendedContext, prId string) ([]Item, error)

func (*PgPrRepo) GetLendingRequestBySupplierSymbolAndRequesterReqId

func (r *PgPrRepo) GetLendingRequestBySupplierSymbolAndRequesterReqId(ctx common.ExtendedContext, supplierSymbol string, requesterReId string) (PatronRequest, error)

func (*PgPrRepo) GetNextHrid

func (r *PgPrRepo) GetNextHrid(ctx common.ExtendedContext, prefix string) (string, error)

func (*PgPrRepo) GetNotificationById

func (r *PgPrRepo) GetNotificationById(ctx common.ExtendedContext, id string) (Notification, error)

func (*PgPrRepo) GetNotificationsByPrId

func (r *PgPrRepo) GetNotificationsByPrId(ctx common.ExtendedContext, params GetNotificationsByPrIdParams) ([]Notification, int64, error)

func (*PgPrRepo) GetPatronRequestById

func (r *PgPrRepo) GetPatronRequestById(ctx common.ExtendedContext, id string) (PatronRequest, error)

func (*PgPrRepo) GetPatronRequestByIdAndSide

func (r *PgPrRepo) GetPatronRequestByIdAndSide(ctx common.ExtendedContext, id string, side PatronRequestSide) (PatronRequest, error)

func (*PgPrRepo) GetPatronRequestByIdForUpdate

func (r *PgPrRepo) GetPatronRequestByIdForUpdate(ctx common.ExtendedContext, id string) (PatronRequest, error)

func (*PgPrRepo) GetPatronRequestSearchView

func (r *PgPrRepo) GetPatronRequestSearchView(ctx common.ExtendedContext, id string) (PatronRequestSearchView, error)

func (*PgPrRepo) ListPatronRequests

func (r *PgPrRepo) ListPatronRequests(ctx common.ExtendedContext, params ListPatronRequestsParams, cql *string) ([]PatronRequest, int64, error)

func (*PgPrRepo) ListPatronRequestsSearchView

func (r *PgPrRepo) ListPatronRequestsSearchView(ctx common.ExtendedContext, params ListPatronRequestsParams, cql *string) ([]PatronRequestSearchView, int64, error)

func (*PgPrRepo) MarkConditionNotificationsReceipt

func (r *PgPrRepo) MarkConditionNotificationsReceipt(ctx common.ExtendedContext, params MarkConditionNotificationsReceiptParams) error

func (*PgPrRepo) SaveItem

func (r *PgPrRepo) SaveItem(ctx common.ExtendedContext, params SaveItemParams) (Item, error)

func (*PgPrRepo) SaveNotification

func (r *PgPrRepo) SaveNotification(ctx common.ExtendedContext, params SaveNotificationParams) (Notification, error)

func (*PgPrRepo) UpdatePatronRequest

func (r *PgPrRepo) UpdatePatronRequest(ctx common.ExtendedContext, params UpdatePatronRequestParams) (PatronRequest, error)

func (*PgPrRepo) WithTxFunc

func (r *PgPrRepo) WithTxFunc(ctx common.ExtendedContext, fn func(PrRepo) error) error

delegate transaction handling to Base

type PrItem

type PrItem struct {
	ID         string    `json:"id"`
	Barcode    string    `json:"barcode"`
	CallNumber *string   `json:"call_number"`
	Title      *string   `json:"title"`
	ItemID     *string   `json:"item_id"`
	CreatedAt  time.Time `json:"created_at"`
}

type PrRepo

type PrRepo interface {
	repo.Transactional[PrRepo]
	GetPatronRequestById(ctx common.ExtendedContext, id string) (PatronRequest, error)
	GetPatronRequestSearchView(ctx common.ExtendedContext, id string) (PatronRequestSearchView, error)
	GetPatronRequestByIdForUpdate(ctx common.ExtendedContext, id string) (PatronRequest, error)
	GetPatronRequestByIdAndSide(ctx common.ExtendedContext, id string, side PatronRequestSide) (PatronRequest, error)
	ListPatronRequests(ctx common.ExtendedContext, args ListPatronRequestsParams, cql *string) ([]PatronRequest, int64, error)
	ListPatronRequestsSearchView(ctx common.ExtendedContext, args ListPatronRequestsParams, cql *string) ([]PatronRequestSearchView, int64, error)
	UpdatePatronRequest(ctx common.ExtendedContext, params UpdatePatronRequestParams) (PatronRequest, error)
	CreatePatronRequest(ctx common.ExtendedContext, params CreatePatronRequestParams) (PatronRequest, error)
	DeletePatronRequest(ctx common.ExtendedContext, id string) error
	GetLendingRequestBySupplierSymbolAndRequesterReqId(ctx common.ExtendedContext, supplierSymbol string, requesterReId string) (PatronRequest, error)
	GetNextHrid(ctx common.ExtendedContext, prefix string) (string, error)
	SaveItem(ctx common.ExtendedContext, params SaveItemParams) (Item, error)
	GetItemById(ctx common.ExtendedContext, id string) (Item, error)
	GetItemsByPrId(ctx common.ExtendedContext, prId string) ([]Item, error)
	SaveNotification(ctx common.ExtendedContext, params SaveNotificationParams) (Notification, error)
	GetNotificationById(ctx common.ExtendedContext, id string) (Notification, error)
	GetNotificationsByPrId(ctx common.ExtendedContext, params GetNotificationsByPrIdParams) ([]Notification, int64, error)
	MarkConditionNotificationsReceipt(ctx common.ExtendedContext, params MarkConditionNotificationsReceiptParams) error
	DeleteNotificationById(ctx common.ExtendedContext, id string) error
	DeleteItemById(ctx common.ExtendedContext, id string) error
}

func CreatePrRepo

func CreatePrRepo(dbPool *pgxpool.Pool, explainAnalyze bool) PrRepo

Jump to

Keyboard shortcuts

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