Documentation
¶
Index ¶
- Constants
- type Repository
- func (this *Repository) AddNode(ctx int64, position nest.Position, rId int64, name string, status nest.Status) (result int64, err error)
- func (this *Repository) AddRoot(ctx int64, name string, status nest.Status) (result int64, err error)
- func (this *Repository) AddToFirst(ctx, pId int64, name string, status nest.Status) (result int64, err error)
- func (this *Repository) AddToLast(ctx, pId int64, name string, status nest.Status) (result int64, err error)
- func (this *Repository) AddToLeft(ctx, rId int64, name string, status nest.Status) (result int64, err error)
- func (this *Repository) AddToRight(ctx, rId int64, name string, status nest.Status) (result int64, err error)
- func (this *Repository) BeginTx() (dbs.TX, nest.Repository)
- func (this *Repository) DB() dbs.DB
- func (this *Repository) Dialect() dbs.Dialect
- func (this *Repository) ExBeginTx() (dbs.TX, Repository)
- func (this *Repository) ExWithTx(tx dbs.TX) Repository
- func (this *Repository) GetChildNodeIds(ctx, pId int64, status nest.Status, depth int) (result []int64, err error)
- func (this *Repository) GetChildNodePathIds(ctx, pId int64, status nest.Status, depth int) (result []int64, err error)
- func (this *Repository) GetChildNodePaths(ctx, pId int64, status nest.Status, depth int) (result []*nest.Node, err error)
- func (this *Repository) GetChildNodes(ctx, pId int64, status nest.Status, depth int) (result []*nest.Node, err error)
- func (this *Repository) GetFirstNode(ctx, pId int64) (result *nest.Node, err error)
- func (this *Repository) GetLastNode(ctx, pId int64) (result *nest.Node, err error)
- func (this *Repository) GetNextNode(ctx, id int64) (result *nest.Node, err error)
- func (this *Repository) GetNode(ctx, id int64) (result *nest.Node, err error)
- func (this *Repository) GetNodeIds(ctx, pId int64, status nest.Status, depth int, name string, ...) (result []int64, err error)
- func (this *Repository) GetNodePaths(ctx, id int64, status nest.Status) (result []*nest.Node, err error)
- func (this *Repository) GetNodeWithName(ctx int, name string) (result *nest.Node, err error)
- func (this *Repository) GetNodes(ctx, pId int64, status nest.Status, depth int, name string, ...) (result []*nest.Node, err error)
- func (this *Repository) GetParent(ctx, id int64) (result *nest.Node, err error)
- func (this *Repository) GetParentNodes(ctx, id int64, status nest.Status) (result []*nest.Node, err error)
- func (this *Repository) GetPreviousNode(ctx, id int64) (result *nest.Node, err error)
- func (this *Repository) IdGenerator() dbs.IdGenerator
- func (this *Repository) MoveDown(ctx, id int64) (err error)
- func (this *Repository) MoveTo(ctx, id, rId int64, position nest.Position) (err error)
- func (this *Repository) MoveToFirst(ctx, id, pId int64) (err error)
- func (this *Repository) MoveToLast(ctx, id, pId int64) (err error)
- func (this *Repository) MoveToLeft(ctx, id, rId int64) (err error)
- func (this *Repository) MoveToRight(ctx, id, rId int64) (err error)
- func (this *Repository) MoveToRoot(ctx, id int64) (err error)
- func (this *Repository) MoveUp(ctx, id int64) (err error)
- func (this *Repository) RemoveNode(ctx, id int64) (err error)
- func (this *Repository) Table() string
- func (this *Repository) UpdateNodeName(ctx, id int64, name string) (err error)
- func (this *Repository) UpdateNodeStatus(ctx, id int64, status nest.Status) (err error)
- func (this *Repository) UseIdGenerator(g dbs.IdGenerator)
- func (this *Repository) WithTx(tx dbs.TX) nest.Repository
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 (*Repository) AddToFirst ¶
func (*Repository) AddToRight ¶
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 (*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 (*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 (*Repository) GetNodePaths ¶
func (*Repository) GetNodeWithName ¶
func (*Repository) GetParent ¶
func (this *Repository) GetParent(ctx, id int64) (result *nest.Node, err error)
func (*Repository) GetParentNodes ¶
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
Click to show internal directories.
Click to hide internal directories.