8000 Removed unneeded `is_annotated` column · utPLSQL/utPLSQL@5d4c33c · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d4c33c

Browse files
committed
Removed unneeded is_annotated column
1 parent 641b3b4 commit 5d4c33c

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

source/core/annotations/ut_annotation_cache_info.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ create table ut_annotation_cache_info (
1717
object_name varchar2(250) not null,
1818
object_type varchar2(250) not null,
1919
parse_time timestamp not null,
20-
is_annotated varchar2(1) not null,
21-
constraint ut_annotation_cache_info_ck1 check(is_annotated in ('Y','N')),
2220
constraint ut_annotation_cache_info_pk primary key(cache_id) using index,
2321
constraint ut_annotation_cache_info_uk unique (object_owner, object_type, object_name) using index,
2422
constraint ut_annotation_cache_info_fk foreign key(object_owner, object_type) references ut_annotation_cache_schema(object_owner, object_type) on delete cascade

source/core/annotations/ut_annotation_cache_manager.pkb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,16 @@ create or replace package body ut_annotation_cache_manager as
3535
if ora_sysevent is null or a_object.annotations is not null and a_object.annotations.count > 0 then
3636

3737
update ut_annotation_cache_info i
38-
set i.parse_time = l_timestamp,
39-
i.is_annotated = case when a_object.annotations is not empty then 'Y' else 'N' end
38+
set i.parse_time = l_timestamp
4039
where (i.object_owner, i.object_name, i.object_type)
4140
in ((a_object.object_owner, a_object.object_name, a_object.object_type))
4241
returning cache_id into l_cache_id;
4342

4443
if sql%rowcount = 0 then
4544

4645
insert into ut_annotation_cache_info
47-
(cache_id, object_owner, object_name, object_type, parse_time, is_annotated)
48-
values (ut_annotation_cache_seq.nextval, a_object.object_owner, a_object.object_name, a_object.object_type, l_timestamp,
49-
case when a_object.annotations is not empty then 'Y' else 'N' end
50-
)
46+
(cache_id, object_owner, object_name, object_type, parse_time)
47+
values (ut_annotation_cache_seq.nextval, a_object.object_owner, a_object.object_name, a_object.object_type, l_timestamp)
5148
returning cache_id into l_cache_id;
5249
end if;
5350

@@ -108,11 +105,10 @@ create or replace package body ut_annotation_cache_manager as
108105
and o.object_owner = i.object_owner)
109106
when matched then
110107
update
111-
set parse_time = l_timestamp,
112-
is_annotated = 'N'
108+
set parse_time = l_timestamp
113109
when not matched then insert
114-
(cache_id, object_owner, object_name, object_type, parse_time, is_annotated)
115-
values (ut_annotation_cache_seq.nextval, o.object_owner, o.object_name, o.object_type, l_timestamp, 'N');
110+
(cache_id, object_owner, object_name, object_type, parse_time)
111+
values (ut_annotation_cache_seq.nextval, o.object_owner, o.object_name, o.object_type, l_timestamp);
116112

117113
commit;
118114
end;

test/ut3_tester/core/annotations/test_annotation_cache.pkb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ create or replace package body test_annotation_cache is
99
from ut3.ut_annotation_cache_info
1010
where object_owner = 'UT3_CACHE_TEST_OWNER';
1111
open l_expected_cache_info for
12-
select 'UT3_CACHE_TEST_OWNER' as object_owner, upper( column_value ) as object_name, 'Y' as is_annotated
12+
select 'UT3_CACHE_TEST_OWNER' as object_owner, upper( column_value ) a 469D s object_name
1313
from table (a_packages) x;
1414
ut.expect( l_actual_cache_info ).to_equal( l_expected_cache_info ).exclude( 'CACHE_ID,PARSE_TIME,OBJECT_TYPE' ).JOIN_BY('OBJECT_NAME');
1515
end;

0 commit comments

Comments
 (0)
0