func (s *StartTransaction) Schema() sql.Schema {
	if s.Child == nil {
		return nil
	}
	return s.Child.Schema()
}
Schema implements the sql.Node interface.
package plan
import (
	"fmt"
	"github.com/dolthub/go-mysql-server/sql"
)
type StartTransaction struct {
	UnaryNode  
	db        sql.Database
	transChar sql.TransactionCharacteristic
}
var _ sql.Databaser = (*StartTransaction)(nil)
var _ sql.Node = (*StartTransaction)(nil)
func NewStartTransaction(db sql.UnresolvedDatabase, transactionChar sql.TransactionCharacteristic) *StartTransaction {
	return &StartTransaction{
		db:        db,
		transChar: transactionChar,
	}
}
func (s *StartTransaction) Database() sql.Database {
	return s.db
}
func (s StartTransaction) WithDatabase(database sql.Database) (sql.Node, error) {
	s.db = database
	return &s, nil
}
func (s *StartTransaction) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error) {
	tdb, ok := s.db.(sql.TransactionDatabase)
	if !ok {
		if s.Child == nil {
			return sql.RowsToRowIter(), nil
		}
		return s.Child.RowIter(ctx, row)
	}
	currentTx := ctx.GetTransaction()
	if currentTx != nil {
		err := tdb.CommitTransaction(ctx, currentTx)
		if err != nil {
			return nil, err
		}
	}
	transaction, err := tdb.StartTransaction(ctx, s.transChar)
	if err != nil {
		return nil, err
	}
	ctx.SetTransaction(transaction)
	ctx.SetIgnoreAutoCommit(true)
	if s.Child == nil {
		return sql.RowsToRowIter(), nil
	}
	return s.Child.RowIter(ctx, row)
}
func (s *StartTransaction) String() string {
	if s.Child != nil {
		return s.Child.String()
	}
	return "Start Transaction"
}
func (s *StartTransaction) DebugString() string {
	tp := sql.NewTreePrinter()
	_ = tp.WriteNode("Start Transaction")
	if s.Child != nil {
		_ = tp.WriteChildren(sql.DebugString(s.Child))
	}
	return tp.String()
}
func (s *StartTransaction) Children() []sql.Node {
	if s.Child == nil {
		return nil
	}
	return []sql.Node{s.Child}
}
func (s StartTransaction) WithChildren(children ...sql.Node) (sql.Node, error) {
	if s.Child == nil {
		if len(children) != 0 {
			return nil, sql.ErrInvalidChildrenNumber.New(s, len(children), 0)
		}
		return &s, nil
	}
	if len(children) != 1 {
		return nil, sql.ErrInvalidChildrenNumber.New(s, len(children), 1)
	}
	s.Child = children[0]
	return &s, nil
}
func (s *StartTransaction) Resolved() bool {
	_, unresolved := s.db.(sql.UnresolvedDatabase)
	dbResolved := !unresolved || s.db.Name() == ""
	if s.Child != nil {
		return dbResolved && s.Child.Resolved()
	}
	return dbResolved
}