Main Tables Views Materialized Views Indexes Constraints Triggers Procedures Functions Packages Sequences Java Sources Jobs Sanity Check Index DDL scrips
Arguments Source

LOOKUP_CLIENT_CAPABILITY

DDL script

Arguments:

NameData TypeDefault ValueIn/Out
NAME_INVARCHAR2 IN

Returns:

NUMBER(38)

Source

Legend: comment string keyword reserved word operator
     1: function
     2: lookup_client_capability(name_in in varchar2)
     3: return number
     4: is
     5:     cap_name_id		number;
     6: begin
     7:     select id
     8:       into cap_name_id
     9:       from rhnClientCapabilityName
    10:      where name = name_in;
    11: 
    12:     return cap_name_id;
    13: exception when no_data_found then
    14:     begin
    15:         select insert_client_capability(name_in) into cap_name_id from dual;
    16:     exception when dup_val_on_index then
    17:         select id
    18:           into cap_name_id
    19:           from rhnClientCapabilityName
    20:          where name = name_in;
    21:     end;
    22: 	return cap_name_id;
    23: end;