func (fn Function0) Call(args ...Expression) (Expression, error) {
	if len(args) != 0 {
		return nil, ErrInvalidArgumentNumber.New(fn.Name, 0, len(args))
	}
	return fn.Fn(), nil
}
Call implements the Function interface.
package sql
import (
	"github.com/src-d/go-mysql-server/internal/similartext"
	"gopkg.in/src-d/go-errors.v1"
)
var ErrFunctionAlreadyRegistered = errors.NewKind("function '%s' is already registered")
var ErrFunctionNotFound = errors.NewKind("function: '%s' not found")
var ErrInvalidArgumentNumber = errors.NewKind("function '%s' expected %v arguments, %v received")
type Function interface {
	Call(...Expression) (Expression, error)
	name() string
	isFunction()
}
type (
	Function0 struct {
		Name string
		Fn   func() Expression
	}
	Function1 struct {
		Name string
		Fn   func(e Expression) Expression
	}
	Function2 struct {
		Name string
		Fn   func(e1, e2 Expression) Expression
	}
	Function3 struct {
		Name string
		Fn   func(e1, e2, e3 Expression) Expression
	}
	Function4 struct {
		Name string
		Fn   func(e1, e2, e3, e4 Expression) Expression
	}
	Function5 struct {
		Name string
		Fn   func(e1, e2, e3, e4, e5 Expression) Expression
	}
	Function6 struct {
		Name string
		Fn   func(e1, e2, e3, e4, e5, e6 Expression) Expression
	}
	Function7 struct {
		Name string
		Fn   func(e1, e2, e3, e4, e5, e6, e7 Expression) Expression
	}
	FunctionN struct {
		Name string
		Fn   func(...Expression) (Expression, error)
	}
)