func (*Literal) Children() []sql.Expression {
	return nil
}
Children implements the Expression interface.
package expression
import (
	"fmt"
	"github.com/src-d/go-mysql-server/sql"
)
type Literal struct {
	value     interface{}
	fieldType sql.Type
}
func NewLiteral(value interface{}, fieldType sql.Type) *Literal {
	return &Literal{
		value:     value,
		fieldType: fieldType,
	}
}
func (p *Literal) Resolved() bool {
	return true
}
func (p *Literal) IsNullable() bool {
	return p.value == nil
}
func (p *Literal) Type() sql.Type {
	return p.fieldType
}
func (p *Literal) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
	return p.value, nil
}
func (p *Literal) String() string {
	switch v := p.value.(type) {
	case string:
		return fmt.Sprintf("%q", v)
	case []byte:
		return "BLOB"
	default:
		return fmt.Sprint(v)
	}
}
func (p *Literal) WithChildren(children ...sql.Expression) (sql.Expression, error) {
	if len(children) != 0 {
		return nil, sql.ErrInvalidChildrenNumber.New(p, len(children), 0)
	}
	return p, nil
}