Skip to content

Commit

Permalink
Fixing oracle integration test (#19408)
Browse files Browse the repository at this point in the history
  • Loading branch information
freddyDOTCMS authored Oct 7, 2020
1 parent 7fdf4fe commit a60bbee
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,13 @@
*/
public class Task05380ChangeContainerPathToAbsolute implements StartupTask {

final static String GET_TEMPLATES_QUERY = "SELECT DISTINCT contentlet.title as host_name, template.inode, template.identifier, template.drawed_body, template.body " +
final static String GET_TEMPLATES_QUERY = "SELECT contentlet.title as host_name, template.inode, template.identifier, template.drawed_body, template.body " +
"FROM identifier " +
"INNER JOIN template ON identifier.id = template.identifier " +
"INNER JOIN contentlet_version_info cvi on identifier.host_inode = cvi.identifier " +
"INNER JOIN contentlet ON cvi.working_inode = contentlet.inode " +
"WHERE template.drawed_body is not null order by template.inode";

final static String GET_TEMPLATES_QUERY_ORACLE = "SELECT DISTINCT contentlet.title as host_name, template.inode, template.identifier, to_char(template.drawed_body), to_char(template.body) " +
"FROM identifier " +
"INNER JOIN template ON identifier.id = template.identifier " +
"INNER JOIN contentlet_version_info cvi on identifier.host_inode = cvi.identifier " +
"INNER JOIN contentlet ON cvi.working_inode = contentlet.inode " +
"WHERE to_char(template.drawed_body) is not null order by template.inode";

final static String UPDATE_TEMPLATES = "update template set drawed_body = ?, body = ? where inode =?";

final static String UPDATE_TEMPLATES_ORACLE = "update template set drawed_body = TO_CLOB(?), body = ? where inode =?";
Expand Down Expand Up @@ -113,7 +106,7 @@ private List<String> getRelativePaths(final String drawedBody) {

private List<Map<String, Object>> getAllDrawedTemplates() throws DotDataException {
return new DotConnect()
.setSQL(DbConnectionFactory.isOracle() ? GET_TEMPLATES_QUERY_ORACLE : GET_TEMPLATES_QUERY)
.setSQL(GET_TEMPLATES_QUERY)
.loadObjectResults();
}
}

0 comments on commit a60bbee

Please sign in to comment.