Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAfterNodeNotFound = mrerr.NewProto( "mrordering.errAfterNodeNotFound", mrerr.ErrorKindUser, "after node with ID={{ .id }} not found")
ErrAfterNodeNotFound - after node with ID not found.
Functions ¶
This section is empty.
Types ¶
type Mover ¶
type Mover interface {
InsertToFirst(ctx context.Context, nodeID uint64, condition mrstorage.SQLPartFunc) error
InsertToLast(ctx context.Context, nodeID uint64, condition mrstorage.SQLPartFunc) error
MoveToLast(ctx context.Context, nodeID uint64, condition mrstorage.SQLPartFunc) error
MoveToFirst(ctx context.Context, nodeID uint64, condition mrstorage.SQLPartFunc) error
MoveAfterID(ctx context.Context, nodeID, afterNodeID uint64, condition mrstorage.SQLPartFunc) error
Unlink(ctx context.Context, nodeID uint64, condition mrstorage.SQLPartFunc) error
}
Mover - управляет порядком следования элементов.
type Storage ¶
type Storage interface {
FetchNode(ctx context.Context, rowID uint64, condition mrstorage.SQLPartFunc) (entity.Node, error)
FetchFirstNode(ctx context.Context, condition mrstorage.SQLPartFunc) (entity.Node, error)
FetchLastNode(ctx context.Context, condition mrstorage.SQLPartFunc) (entity.Node, error)
UpdateNode(ctx context.Context, row entity.Node, condition mrstorage.SQLPartFunc) error
UpdateNodePrevID(ctx context.Context, rowID uint64, prevID mrentity.ZeronullUint64, condition mrstorage.SQLPartFunc) error
UpdateNodeNextID(ctx context.Context, rowID uint64, nextID mrentity.ZeronullUint64, condition mrstorage.SQLPartFunc) error
RecalcOrderIndex(ctx context.Context, minBorder, step uint64, condition mrstorage.SQLPartFunc) error
}
Storage - доступ служебным данным используемым для построения порядка следования элементов.
Click to show internal directories.
Click to hide internal directories.