cachedpg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApprovalQ

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

func (*ApprovalQ) ApprovalsByTransferIndexCtx

func (q *ApprovalQ) ApprovalsByTransferIndexCtx(ctx context.Context, transferIndex []byte, isForUpdate bool) ([]data.Approval, error)

func (*ApprovalQ) InsertBatchCtx

func (q *ApprovalQ) InsertBatchCtx(ctx context.Context, approvals ...data.Approval) error

type CollectionChainMappingQ

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

func (*CollectionChainMappingQ) CollectionChainMappingByCollectionNetworkCtx

func (q *CollectionChainMappingQ) CollectionChainMappingByCollectionNetworkCtx(ctx context.Context, collection int64, network int, isForUpdate bool) (*data.CollectionChainMapping, error)

func (*CollectionChainMappingQ) DeleteByCollectionCtx

func (q *CollectionChainMappingQ) DeleteByCollectionCtx(ctx context.Context, collection int64) error

func (*CollectionChainMappingQ) DeleteCtx

func (*CollectionChainMappingQ) InsertBatchCtx

func (q *CollectionChainMappingQ) InsertBatchCtx(ctx context.Context, chainMappings ...data.CollectionChainMapping) error

func (*CollectionChainMappingQ) InsertCtx

func (*CollectionChainMappingQ) UpsertCtx

type CollectionQ

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

func (*CollectionQ) CollectionByIndexCtx

func (q *CollectionQ) CollectionByIndexCtx(ctx context.Context, index []byte, isForUpdate bool) (*data.Collection, error)

func (*CollectionQ) DeleteCtx

func (q *CollectionQ) DeleteCtx(ctx context.Context, c *data.Collection) error

func (*CollectionQ) InsertCtx

func (q *CollectionQ) InsertCtx(ctx context.Context, c *data.Collection) error

type ConfirmationsQ

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

func (*ConfirmationsQ) ConfirmationsByTransferIndexCtx

func (q *ConfirmationsQ) ConfirmationsByTransferIndexCtx(ctx context.Context, transferIndex []byte, isForUpdate bool) ([]data.Confirmation, error)

func (*ConfirmationsQ) InsertBatchCtx

func (q *ConfirmationsQ) InsertBatchCtx(ctx context.Context, confirmations ...data.Confirmation) error

type ItemChainMappingQ

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

func (*ItemChainMappingQ) DeleteByItemCtx

func (q *ItemChainMappingQ) DeleteByItemCtx(ctx context.Context, item int64) error

func (*ItemChainMappingQ) DeleteCtx

func (q *ItemChainMappingQ) DeleteCtx(ctx context.Context, icm *data.ItemChainMapping) error

func (*ItemChainMappingQ) InsertBatchCtx

func (q *ItemChainMappingQ) InsertBatchCtx(ctx context.Context, chainMappings ...data.ItemChainMapping) error

func (*ItemChainMappingQ) InsertCtx

func (q *ItemChainMappingQ) InsertCtx(ctx context.Context, icm *data.ItemChainMapping) error

func (*ItemChainMappingQ) ItemChainMappingByItemNetworkCtx

func (q *ItemChainMappingQ) ItemChainMappingByItemNetworkCtx(ctx context.Context, item int64, network int, isForUpdate bool) (*data.ItemChainMapping, error)

func (*ItemChainMappingQ) ItemChainMappingsByNetworkCtx

func (q *ItemChainMappingQ) ItemChainMappingsByNetworkCtx(ctx context.Context, network int, isForUpdate bool) ([]data.ItemChainMapping, error)

type ItemQ

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

func (*ItemQ) DeleteCtx

func (q *ItemQ) DeleteCtx(ctx context.Context, i *data.Item) error

func (*ItemQ) InsertCtx

func (q *ItemQ) InsertCtx(ctx context.Context, i *data.Item) error

func (*ItemQ) ItemByIDCtx

func (q *ItemQ) ItemByIDCtx(ctx context.Context, id int64, isForUpdate bool) (*data.Item, error)

func (*ItemQ) ItemByIndexCtx

func (q *ItemQ) ItemByIndexCtx(ctx context.Context, index []byte, isForUpdate bool) (*data.Item, error)

func (*ItemQ) UpdateCtx

func (q *ItemQ) UpdateCtx(ctx context.Context, i *data.Item) error

type RejectionQ

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

func (*RejectionQ) InsertBatchCtx

func (q *RejectionQ) InsertBatchCtx(ctx context.Context, rejections ...data.Rejection) error

func (*RejectionQ) RejectionsByTransferIndexCtx

func (q *RejectionQ) RejectionsByTransferIndexCtx(ctx context.Context, transferIndex []byte, isForUpdate bool) ([]data.Rejection, error)

type Storage

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

func NewStorage

func NewStorage(log *logan.Entry, raw data.Storage, redisClient *redis.Client) *Storage

func (*Storage) ApprovalQ

func (s *Storage) ApprovalQ() data.ApprovalQ

func (*Storage) CollectionChainMappingQ

func (s *Storage) CollectionChainMappingQ() data.CollectionChainMappingQ

func (*Storage) CollectionQ

func (s *Storage) CollectionQ() data.CollectionQ

func (*Storage) ConfirmationQ

func (s *Storage) ConfirmationQ() data.ConfirmationQ

func (*Storage) ItemChainMappingQ

func (s *Storage) ItemChainMappingQ() data.ItemChainMappingQ

func (*Storage) ItemQ

func (s *Storage) ItemQ() data.ItemQ

func (*Storage) RejectionQ

func (s *Storage) RejectionQ() data.RejectionQ

func (*Storage) Transaction

func (s *Storage) Transaction(f func() error) error

Transaction is a wrapper around data.Storage.Transaction and its internals are not cached. You should not get data from cache within the transaction (because of possible race conditions), use plain pg.Storage's methods instead to get data from DB

func (*Storage) TransactionQ

func (s *Storage) TransactionQ() data.TransactionQ

func (*Storage) TransferQ

func (s *Storage) TransferQ() data.TransferQ

func (*Storage) VoteQ

func (s *Storage) VoteQ() data.VoteQ

type TransfersQ

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

func (*TransfersQ) SelectCtx

func (q *TransfersQ) SelectCtx(ctx context.Context, selector data.TransferSelector) ([]data.Transfer, error)

func (*TransfersQ) SetStatusByIndexCtx

func (q *TransfersQ) SetStatusByIndexCtx(ctx context.Context, status int, indexes ...string) error

func (*TransfersQ) TransferByIndexCtx

func (q *TransfersQ) TransferByIndexCtx(ctx context.Context, index []byte, isForUpdate bool) (*data.Transfer, error)

func (*TransfersQ) UpsertBatchCtx

func (q *TransfersQ) UpsertBatchCtx(ctx context.Context, transfers ...data.Transfer) error

type VoteQ

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

func (*VoteQ) InsertBatchCtx

func (q *VoteQ) InsertBatchCtx(ctx context.Context, votes ...data.Vote) error

func (*VoteQ) VotesByTransferIndexCtx

func (q *VoteQ) VotesByTransferIndexCtx(ctx context.Context, transferIndex []byte, isForUpdate bool) ([]data.Vote, error)

Jump to

Keyboard shortcuts

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