func (c *Config) defaults() error {
	if c.Model == nil {
		return errors.New("rql: 'Model' is a required field")
	}
	if indirect(reflect.TypeOf(c.Model)).Kind() != reflect.Struct {
		return errors.New("rql: 'Model' must be a struct type")
	}
	if c.Log == nil {
		c.Log = log.Printf
	}
	if c.ColumnFn == nil {
		c.ColumnFn = Column
	}
	defaultString(&c.TagName, DefaultTagName)
	defaultString(&c.OpPrefix, DefaultOpPrefix)
	defaultString(&c.FieldSep, DefaultFieldSep)
	defaultInt(&c.DefaultLimit, DefaultLimit)
	defaultInt(&c.LimitMaxValue, DefaultMaxLimit)
	return nil
}
defaults sets the default configuration of Config.
package rql
import (
	"errors"
	"log"
	"reflect"
)
type Op string
func (o Op) SQL() string {
	return opFormat[o]
}
const (
	EQ   = Op("eq")    
	NEQ  = Op("neq")   
	LT   = Op("lt")    
	GT   = Op("gt")    
	LTE  = Op("lte")   
	GTE  = Op("gte")   
	LIKE = Op("like")  
	OR   = Op("or")    
	AND  = Op("and")   
)
const (
	DefaultTagName  = "rql"
	DefaultOpPrefix = "$"
	DefaultFieldSep = "_"
	DefaultLimit    = 25
	DefaultMaxLimit = 100
	Offset          = "offset"
	Limit           = "limit"
)
var (
	sortDirection = map[byte]string{
		'+': "asc",
		'-': "desc",
	}
	opFormat = map[Op]string{
		EQ:   "=",
		NEQ:  "<>",
		LT:   "<",
		GT:   ">",
		LTE:  "<=",
		GTE:  ">=",
		LIKE: "LIKE",
		OR:   "OR",
		AND:  "AND",
	}
)
type Config struct {
	TagName string
	Model interface{}
	OpPrefix string
	FieldSep string
	ColumnFn func(string) string
	Log func(string, ...interface{})
	DefaultLimit int
	LimitMaxValue int
	DefaultSort []string
}