This commit is contained in:
+5
-4
@@ -98,10 +98,11 @@ func (s *Select[T]) execute(conn *simpleorm.DBConnection, tx *sql.Tx) error {
|
||||
}
|
||||
|
||||
if len(s.ordering) > 0 {
|
||||
dml += " ORDER BY"
|
||||
for _, orderBy := range s.ordering {
|
||||
|
||||
dml += " " + orderBy.Field + " " + orderBy.Direction
|
||||
orderBy, err := s.target.GetOrderByDML(s.ordering...)
|
||||
if err != nil {
|
||||
log.LogError("Failed to create ORDER BY part: %s", err)
|
||||
} else {
|
||||
dml += orderBy
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user