Skip to content

Commit

Permalink
missing spaces in queries - merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
qqmyers committed Feb 13, 2025
1 parent e9ff592 commit d73f569
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ public void save(GuestbookResponse guestbookResponse) {

public Long getDownloadCountByDataFileId(Long dataFileId) {
// datafile id is null, will return 0
Query query = em.createNativeQuery("select count(o.id) from GuestbookResponse o where o.datafile_id = " + dataFileId + "and eventtype != '" + GuestbookResponse.ACCESS_REQUEST +"'");
Query query = em.createNativeQuery("select count(o.id) from GuestbookResponse o where o.datafile_id = " + dataFileId + " and eventtype != '" + GuestbookResponse.ACCESS_REQUEST +"'");
return (Long) query.getSingleResult();
}

Expand All @@ -931,7 +931,7 @@ public Long getDownloadCountByDatasetId(Long datasetId, LocalDate date) {
if(date != null) {
query = em.createNativeQuery("select count(o.id) from GuestbookResponse o where o.dataset_id = " + datasetId + " and responsetime < '" + date.toString() + "' and eventtype != '" + GuestbookResponse.ACCESS_REQUEST +"'");
}else {
query = em.createNativeQuery("select count(o.id) from GuestbookResponse o where o.dataset_id = " + datasetId+ "and eventtype != '" + GuestbookResponse.ACCESS_REQUEST +"'");
query = em.createNativeQuery("select count(o.id) from GuestbookResponse o where o.dataset_id = " + datasetId+ " and eventtype != '" + GuestbookResponse.ACCESS_REQUEST +"'");
}
return (Long) query.getSingleResult();
}
Expand Down

0 comments on commit d73f569

Please sign in to comment.