8000 add htmlReportAssetPath parameter to UtplsqlDao.htmlCodeCoverage() · utPLSQL/utPLSQL-SQLDeveloper@833bbad · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 833bbad

Browse files
add htmlReportAssetPath parameter to UtplsqlDao.htmlCodeCoverage()
1 parent 167b943 commit 833bbad

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

sqldev/src/main/java/org/utplsql/sqldev/dal/UtplsqlDao.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.utplsql.sqldev.dal;
1717

18+
import java.net.URL;
1819
import java.sql.CallableStatement;
1920
import java.sql.Connection;
2021
import java.sql.SQLException;
@@ -907,12 +908,14 @@ public OutputLines doInCallableStatement(final CallableStatement cs) throws SQLE
907908
* @param excludeObjectList
908909
* list of objects to be excluded from coverage analysis. None, if
909910
* empty
911+
* @param htmlReportAssetPath
912+
* path of the assets for the coverage report. Default, if null
910913
* @return HTML code coverage report in HTML format
911914
* @throws DataAccessException
912915
* if there is a problem
913916
*/
914917
public String htmlCodeCoverage(final List<String> pathList, final List<String> schemaList,
915-
final List<String> includeObjectList, final List<String> excludeObjectList) {
918+
final List<String> includeObjectList, final List<String> excludeObjectList, final URL htmlReportAssetPath) {
916919
StringBuilder sb = new StringBuilder();
917920
sb.append("SELECT column_value\n");
918921
sb.append(" FROM table(\n");
@@ -935,7 +938,14 @@ public String htmlCodeCoverage(final List<String> pathList, final List<String> s
935938
sb.append(StringTools.getCSV(excludeObjectList, 16));
936939
sb.append(" ),\n");
937940
}
938-
sb.append(" a_reporter => ut_coverage_html_reporter()\n");
941+
sb.append(" a_reporter => ut_coverage_html_reporter(\n");
942+
sb.append(" a_html_report_assets_path => '");
943+
if (htmlReportAssetPath != null) {
944+
// empty string is handled as NULL in Oracle Database
945+
sb.append(htmlReportAssetPath.toExternalForm());
946+
}
947+
sb.append("'\n");
948+
sb.append(" )\n");
939949
sb.append(" )\n");
940950
sb.append(" )");
941951
final String sql = sb.toString();

0 commit comments

Comments
 (0)
0