RawCols generate raw "col1, col2, group_concat(col3)" statement

This commit is contained in:
jiangyanfeng 2018-10-13 19:00:26 +08:00 committed by Lunny Xiao
parent eabfb48b5d
commit e6786ce052
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 6 additions and 0 deletions

View File

@ -106,6 +106,12 @@ func (session *Session) Cols(columns ...string) *Session {
return session
}
// RawCols generate raw "col1, col2" statement
func (session *Session) RawCols(columns ...string) *Session {
session.statement.ColumnStr = strings.Join(columns, ", ")
return session
}
// AllCols ask all columns
func (session *Session) AllCols() *Session {
session.statement.AllCols()