github.com/RevenueMonster/sqlike@v1.0.6/sql/expr/collate.go (about)

     1  package expr
     2  
     3  import "github.com/RevenueMonster/sqlike/sqlike/primitive"
     4  
     5  // Collate :
     6  func Collate(collate string, col interface{}, charset ...string) (o primitive.Encoding) {
     7  	if len(charset) > 0 {
     8  		o.Charset = &charset[0]
     9  	}
    10  	o.Column = col
    11  	o.Collate = collate
    12  	return
    13  }