mrordering

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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 - доступ служебным данным используемым для построения порядка следования элементов.

Directories

Path Synopsis
component

Jump to

Keyboard shortcuts

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