소스 검색

refactor(storage): remove a useless ORDER BY in GetEnclosure

The query selects a single row by primary key, there is no need to sort
anything.
jvoisin 2 주 전
부모
커밋
c4c357d99d
1개의 변경된 파일0개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 1
      internal/storage/enclosure.go

+ 0 - 1
internal/storage/enclosure.go

@@ -120,7 +120,6 @@ func (s *Storage) GetEnclosure(enclosureID int64) (*model.Enclosure, error) {
 			enclosures
 		WHERE
 			id = $1
-		ORDER BY id ASC
 	`
 
 	row := s.db.QueryRow(query, enclosureID)