func (b *SelectStmt) Distinct() *SelectStmt {
	b.IsDistinct = true
	return b
}
Distinct adds `DISTINCT`
package dbr
import "fmt"
type SelectStmt struct {
	raw
	IsDistinct bool
	Column    []interface{}
	Table     interface{}
	JoinTable []Builder
	WhereCond  []Condition
	Group      []Builder
	HavingCond []Condition
	Order      []Builder
	LimitCount  int64
	OffsetCount int64
}
func (b *SelectStmt) Build(d Dialect, buf Buffer) error {
	if b.raw.Query != "" {
		return b.raw.Build(d, buf)
	}
	if len(b.Column) == 0 {
		return ErrColumnNotSpecified
	}
	buf.WriteString("SELECT ")
	if b.IsDistinct {
		buf.WriteString("DISTINCT ")
	}
	for i, col := range b.Column {
		if i > 0 {
			buf.WriteString(", ")
		}
		switch col := col.(type) {
		case string:
			buf.WriteString(col)
		default:
			buf.WriteString(d.Placeholder())
			buf.WriteValue(col)
		}
	}
	if b.Table != nil {
		buf.WriteString(" FROM ")
		switch table := b.Table.(type) {
		case string:
			buf.WriteString(table)
		default:
			buf.WriteString(d.Placeholder())
			buf.WriteValue(table)
		}
		if len(b.JoinTable) > 0 {
			for _, join := range b.JoinTable {
				err := join.Build(d, buf)
				if err != nil {
					return err
				}
			}
		}
	}
	if len(b.WhereCond) > 0 {
		buf.WriteString(" WHERE ")
		err := And(b.WhereCond...).Build(d, buf)
		if err != nil {
			return err
		}
	}
	if len(b.Group) > 0 {
		buf.WriteString(" GROUP BY ")
		for i, group := range b.Group {
			if i > 0 {
				buf.WriteString(", ")
			}
			err := group.Build(d, buf)
			if err != nil {
				return err
			}
		}
	}
	if len(b.HavingCond) > 0 {
		buf.WriteString(" HAVING ")
		err := And(b.HavingCond...).Build(d, buf)
		if err != nil {
			return err
		}
	}
	if len(b.Order) > 0 {
		buf.WriteString(" ORDER BY ")
		for i, order := range b.Order {
			if i > 0 {
				buf.WriteString(", ")
			}
			err := order.Build(d, buf)
			if err != nil {
				return err
			}
		}
	}
	if b.LimitCount >= 0 {
		buf.WriteString(" LIMIT ")
		buf.WriteString(fmt.Sprint(b.LimitCount))
	}
	if b.OffsetCount >= 0 {
		buf.WriteString(" OFFSET ")
		buf.WriteString(fmt.Sprint(b.OffsetCount))
	}
	return nil
}
func Select(column ...interface{}) *SelectStmt {
	return &SelectStmt{
		Column:      column,
		LimitCount:  -1,
		OffsetCount: -1,
	}
}
func (b *SelectStmt) From(table interface{}) *SelectStmt {
	b.Table = table
	return b
}
func SelectBySql(query string, value ...interface{}) *SelectStmt {
	return &SelectStmt{
		raw: raw{
			Query: query,
			Value: value,
		},
		LimitCount:  -1,
		OffsetCount: -1,
	}
}