for _, orderByExpr := range sel.OrderBy {
_, colName, err := convertColName(c.fnInterceptor, orderByExpr.Expr, FieldNameSorter)
converter_legacy.go
if err != nil {
return nil, wrapConverterError("unable to convert 'order by' column name", err)
}
if orderByExpr.Direction == sqlparser.DescScr {
fieldSort = fieldSort.Desc()
}
}