sql

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Delete nest.Status = -1 // 删除

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository(db dbs.DB, dialect dbs.Dialect, table string) Repository

func (*Repository) AddNode

func (this *Repository) AddNode(ctx int64, position nest.Position, rId int64, name string, status nest.Status) (result int64, err error)

func (*Repository) AddRoot

func (this *Repository) AddRoot(ctx int64, name string, status nest.Status) (result int64, err error)

func (*Repository) AddToFirst

func (this *Repository) AddToFirst(ctx, pId int64, name string, status nest.Status) (result int64, err error)

func (*Repository) AddToLast

func (this *Repository) AddToLast(ctx, pId int64, name string, status nest.Status) (result int64, err error)

func (*Repository) AddToLeft

func (this *Repository) AddToLeft(ctx, rId int64, name string, status nest.Status) (result int64, err error)

func (*Repository) AddToRight

func (this *Repository) AddToRight(ctx, rId int64, name string, status nest.Status) (result int64, err error)

func (*Repository) BeginTx

func (this *Repository) BeginTx() (dbs.TX, nest.Repository)

func (*Repository) DB

func (this *Repository) DB() dbs.DB

func (*Repository) Dialect

func (this *Repository) Dialect() dbs.Dialect

func (*Repository) ExBeginTx

func (this *Repository) ExBeginTx() (dbs.TX, Repository)

func (*Repository) ExWithTx

func (this *Repository) ExWithTx(tx dbs.TX) Repository

func (*Repository) GetChildNodeIds

func (this *Repository) GetChildNodeIds(ctx, pId int64, status nest.Status, depth int) (result []int64, err error)

func (*Repository) GetChildNodePathIds

func (this *Repository) GetChildNodePathIds(ctx, pId int64, status nest.Status, depth int) (result []int64, err error)

GetChildNodePathIds 获取指定节点的子节点 id 列表,返回的 id 列表包含当前节点 id

func (*Repository) GetChildNodePaths

func (this *Repository) GetChildNodePaths(ctx, pId int64, status nest.Status, depth int) (result []*nest.Node, err error)

GetChildNodePaths 获取指定节点的子节点,返回的节点列表包括当前节点

func (*Repository) GetChildNodes

func (this *Repository) GetChildNodes(ctx, pId int64, status nest.Status, depth int) (result []*nest.Node, err error)

func (*Repository) GetFirstNode

func (this *Repository) GetFirstNode(ctx, pId int64) (result *nest.Node, err error)

func (*Repository) GetLastNode

func (this *Repository) GetLastNode(ctx, pId int64) (result *nest.Node, err error)

func (*Repository) GetNextNode

func (this *Repository) GetNextNode(ctx, id int64) (result *nest.Node, err error)

func (*Repository) GetNode

func (this *Repository) GetNode(ctx, id int64) (result *nest.Node, err error)

func (*Repository) GetNodeIds

func (this *Repository) GetNodeIds(ctx, pId int64, status nest.Status, depth int, name string, limit, offset int64, withParent bool) (result []int64, err error)

func (*Repository) GetNodePaths

func (this *Repository) GetNodePaths(ctx, id int64, status nest.Status) (result []*nest.Node, err error)

func (*Repository) GetNodeWithName

func (this *Repository) GetNodeWithName(ctx int, name string) (result *nest.Node, err error)

func (*Repository) GetNodes

func (this *Repository) GetNodes(ctx, pId int64, status nest.Status, depth int, name string, limit, offset int64, withParent bool) (result []*nest.Node, err error)

func (*Repository) GetParent

func (this *Repository) GetParent(ctx, id int64) (result *nest.Node, err error)

func (*Repository) GetParentNodes

func (this *Repository) GetParentNodes(ctx, id int64, status nest.Status) (result []*nest.Node, err error)

func (*Repository) GetPreviousNode

func (this *Repository) GetPreviousNode(ctx, id int64) (result *nest.Node, err error)

func (*Repository) IdGenerator

func (this *Repository) IdGenerator() dbs.IdGenerator

func (*Repository) MoveDown

func (this *Repository) MoveDown(ctx, id int64) (err error)

func (*Repository) MoveTo

func (this *Repository) MoveTo(ctx, id, rId int64, position nest.Position) (err error)

func (*Repository) MoveToFirst

func (this *Repository) MoveToFirst(ctx, id, pId int64) (err error)

func (*Repository) MoveToLast

func (this *Repository) MoveToLast(ctx, id, pId int64) (err error)

func (*Repository) MoveToLeft

func (this *Repository) MoveToLeft(ctx, id, rId int64) (err error)

func (*Repository) MoveToRight

func (this *Repository) MoveToRight(ctx, id, rId int64) (err error)

func (*Repository) MoveToRoot

func (this *Repository) MoveToRoot(ctx, id int64) (err error)

func (*Repository) MoveUp

func (this *Repository) MoveUp(ctx, id int64) (err error)

func (*Repository) RemoveNode

func (this *Repository) RemoveNode(ctx, id int64) (err error)

func (*Repository) Table

func (this *Repository) Table() string

func (*Repository) UpdateNodeName

func (this *Repository) UpdateNodeName(ctx, id int64, name string) (err error)

func (*Repository) UpdateNodeStatus

func (this *Repository) UpdateNodeStatus(ctx, id int64, status nest.Status) (err error)

func (*Repository) UseIdGenerator

func (this *Repository) UseIdGenerator(g dbs.IdGenerator)

func (*Repository) WithTx

func (this *Repository) WithTx(tx dbs.TX) nest.Repository

Jump to

Keyboard shortcuts

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