func (s *Select) To() *json.RGATreeSplitNodePos {
	return s.to
}
To returns the end point of the selection.
package operation
import (
	"github.com/yorkie-team/yorkie/pkg/document/json"
	"github.com/yorkie-team/yorkie/pkg/document/time"
)
type Select struct {
	parentCreatedAt *time.Ticket
	from *json.RGATreeSplitNodePos
	to *json.RGATreeSplitNodePos
	executedAt *time.Ticket
}
func NewSelect(
	parentCreatedAt *time.Ticket,
	from *json.RGATreeSplitNodePos,
	to *json.RGATreeSplitNodePos,
	executedAt *time.Ticket,
) *Select {
	return &Select{
		parentCreatedAt: parentCreatedAt,
		from:            from,
		to:              to,
		executedAt:      executedAt,
	}
}
func (s *Select) Execute(root *json.Root) error {
	parent := root.FindByCreatedAt(s.parentCreatedAt)
	switch obj := parent.(type) {
	case *json.Text:
		obj.Select(s.from, s.to, s.executedAt)
	case *json.RichText:
		obj.Select(s.from, s.to, s.executedAt)
	default:
		return ErrNotApplicableDataType
	}
	return nil
}
func (s *Select) From() *json.RGATreeSplitNodePos {
	return s.from
}