github.com/dolthub/go-mysql-server@v0.18.0/sql/plan/disjointed_children.go (about)

     1  package plan
     2  
     3  import "github.com/dolthub/go-mysql-server/sql"
     4  
     5  // DisjointedChildrenNode is a sql.Node that contains multiple, disjointed groupings of child nodes. This is a highly
     6  // specialized node that will not be applicable to the majority, as most nodes will return all children in the Children()
     7  // function. For those nodes that do not return all of their children in the Children() function (such as InsertInto),
     8  // operations such as stored procedures require the implementation of this interface so that those unexposed children
     9  // may be accessed.
    10  type DisjointedChildrenNode interface {
    11  	sql.Node
    12  	// DisjointedChildren returns multiple groupings of child nodes, with each group being unrelated to the other groups.
    13  	DisjointedChildren() [][]sql.Node
    14  	// WithDisjointedChildren returns a copy of the node with all child groups replaced.
    15  	// Returns an error if the number of children in each group is different than the current number of children in each
    16  	// group. They must be given in the same order as they are returned by DisjointedChildren.
    17  	WithDisjointedChildren(children [][]sql.Node) (sql.Node, error)
    18  }