Standardize with identification variables

This commit is contained in:
Alex Gryczewski 2023-09-12 11:15:21 -04:00
parent c43835b8e8
commit b74bdad322

View File

@ -9,9 +9,9 @@ import java.util.Optional;
public interface GalleryRepository extends JpaRepository<Gallery, Long> {
@Query(value = "SELECT * FROM gallery g WHERE g.server_id = ?1", nativeQuery = true)
@Query(value = "SELECT g FROM gallery g WHERE g.server_id = ?1", nativeQuery = true)
public List<Gallery> findAllByServer(String serverId);
@Query(value = "SELECT * FROM gallery g WHERE g.server_id = ?1 and g.channel_id = ?2", nativeQuery = true)
@Query(value = "SELECT g FROM gallery g WHERE g.server_id = ?1 and g.channel_id = ?2", nativeQuery = true)
public Optional<Gallery> findByServerAndChannel(String serverId, String channelId);
}