Skip to content

Commit

Permalink
use all caps for sql keywords as is current convention
Browse files Browse the repository at this point in the history
  • Loading branch information
pshapiro4broad committed Jan 8, 2025
1 parent 81f1c4e commit a20d1ad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/bio/terra/service/profile/ProfileDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ public boolean deleteBillingProfileById(UUID id) {
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public List<ProfileOwnedResource> listProfileOwnedResources(UUID profileId) {
String sql =
"select dataset.id as id, dataset.name as name, dataset.description as description, 'DATASET' as type "
+ "from dataset where dataset.default_profile_id = :profile_id "
+ "union all "
+ "select snapshot.id as id, snapshot.name as name, snapshot.description as description, 'SNAPSHOT' as type "
+ "from snapshot where snapshot.profile_id = :profile_id";
"SELECT dataset.id AS id, dataset.name AS name, dataset.description AS description, 'DATASET' AS type "
+ "FROM dataset WHERE dataset.default_profile_id = :profile_id "
+ "UNION ALL "
+ "SELECT snapshot.id AS id, snapshot.name AS name, snapshot.description AS description, 'SNAPSHOT' AS type "
+ "FROM snapshot WHERE snapshot.profile_id = :profile_id";
return jdbcTemplate.query(
sql,
Map.of("profile_id", profileId),
Expand Down

0 comments on commit a20d1ad

Please sign in to comment.