Skip to content

Commit 1a45049

Browse files
pass owner as parameter and return owner of dependencies
this is the base for code coverage based on a single test without the need to define the schemas under test
1 parent 0e1e46e commit 1a45049

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -922,11 +922,11 @@ class UtplsqlDao {
922922
* @param name test package name
923923
* @return list of dependencies in the current schema
924924
*/
925-
def List<String> includes(String name) {
925+
def List<String> includes(String owner, String name) {
926926
val sql = '''
927-
select referenced_name
927+
select referenced_owner || '.' || referenced_name AS dep_name
928928
from «IF dbaViewAccessible»dba«ELSE»all«ENDIF»_dependencies
929-
WHERE owner = user
929+
WHERE owner = upper(?)
930930
AND name = upper(?)
931931
AND referenced_owner NOT IN (
932932
'SYS', 'SYSTEM', 'XS$NULL', 'OJVMSYS', 'LBACSYS', 'OUTLN', 'SYS$UMF',
@@ -940,7 +940,7 @@ class UtplsqlDao {
940940
AND referenced_owner NOT LIKE 'APEX\_______'
941941
AND referenced_type IN ('PACKAGE', 'TYPE', 'PROCEDURE', 'FUNCTION', 'TRIGGER')
942942
'''
943-
val deps = jdbcTemplate.queryForList(sql, String, #[name])
943+
val deps = jdbcTemplate.queryForList(sql, String, #[owner, name])
944944
return deps
945945
}
946946

0 commit comments

Comments
 (0)