Skip to content

Commit

Permalink
task(debt) delete unused MSSQL sql from TemplateFactoryImpl
Browse files Browse the repository at this point in the history
ref: #30288
  • Loading branch information
wezell committed Oct 8, 2024
1 parent 1f4b84b commit 20e6193
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -735,15 +735,11 @@ public List<HTMLPageVersion> getPages(final String templateId)

final DotConnect dotConnect = new DotConnect();

if (DbConnectionFactory.isMsSql()) {
dotConnect.setSQL("SELECT identifier,inode,language_id, variant_id as variant "
+ "FROM contentlet "
+ "WHERE JSON_VALUE(contentlet_as_json, '$.fields.template.value') = ?");
} else {
dotConnect.setSQL("SELECT identifier,inode,language_id,variant_id as variant "
+ "FROM contentlet "
+ "WHERE contentlet_as_json->'fields'->'template'->>'value' = ?");
}

dotConnect.setSQL("SELECT identifier,inode,language_id,variant_id as variant "
+ "FROM contentlet "
+ "WHERE contentlet_as_json->'fields'->'template'->>'value' = ?");


dotConnect.addParam(templateId);

Expand Down Expand Up @@ -980,4 +976,4 @@ private Collection<? extends Permissionable> findFolderAssetTemplate(final User
return Collections.emptyList();
}
}
}
}

0 comments on commit 20e6193

Please sign in to comment.