func (r *Reverse) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error) {
	v, err := r.Child.Eval(ctx, row)
	if v == nil || err != nil {
		return nil, err
	}
	v, err = sql.Text.Convert(v)
	if err != nil {
		return nil, err
	}
	return reverseString(v.(string)), nil
}
Eval implements the Expression interface.
package function
import (
	"fmt"
	"strings"
	"github.com/src-d/go-mysql-server/sql"
	"github.com/src-d/go-mysql-server/sql/expression"
	"gopkg.in/src-d/go-errors.v1"
)
type Reverse struct {
	expression.UnaryExpression
}
func NewReverse(e sql.Expression) sql.Expression {
	return &Reverse{expression.UnaryExpression{Child: e}}
}