func (g *MySqlGrammar) CompileSelect(query *query.Query) string {
	original := query.Columns
	if query.Columns == nil {
		query.Columns = []string{"*"}
	}
	sql := strings.TrimSpace(
		g.concatenate(
			g.compileComponents(query),
		),
	)
	query.Columns = original
	return sql
}
CompileSelect Compile a select query into SQL.
package grammar
import (
	"fmt"
	"regexp"
	"sort"
	"strings"
	"github.com/thinkoner/torm/query"
)
var selectComponents = []string{
	"aggregate",
	"columns",
	"from",
	"joins",
	"wheres",
	"groups",
	"havings",
	"orders",
	"limit",
	"offset",
}
type MySqlGrammar struct {
	BaseGrammar
	tablePrefix string
}