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

LOOKUP_CONFIG_INFO

DDL script

Arguments:

NameData TypeDefault ValueIn/Out
USERNAME_INVARCHAR2 IN
GROUPNAME_INVARCHAR2 IN
FILEMODE_INNUMBER(38) IN
SELINUX_CTX_INVARCHAR2 IN
SYMLINK_TARGET_IDNUMBER(38) IN

Returns:

NUMBER(38)

Source

Legend: comment string keyword reserved word operator
     1: function
     2: lookup_config_info (
     3:     username_in     in varchar2,
     4:     groupname_in    in varchar2,
     5:     filemode_in     in number,
     6:     selinux_ctx_in  in varchar2,
     7:     symlink_target_id in number
     8: ) return number
     9: deterministic
    10: is
    11:     v_id    number;
    12:     cursor lookup_cursor is
    13:         select id
    14:           from rhnConfigInfo
    15:          where 1=1
    16:            and nvl(username, ' ') = nvl(username_in, ' ')
    17:            and nvl(groupname,' ') = nvl(groupname_in, ' ')
    18:            and nvl(filemode, -1) = nvl(filemode_in, -1)
    19:            and nvl(selinux_ctx, ' ') = nvl(selinux_ctx_in, ' ')
    20:            and nvl(symlink_target_filename_id, -1) = nvl(symlink_target_id, -1)
    21:         ;
    22: begin
    23:     for r in lookup_cursor loop
    24:         return r.id;
    25:     end loop;
    26:     -- If we got here, we don't have the id
    27:     v_id := insert_config_info(
    28:             username_in,
    29:             groupname_in,
    30:             filemode_in,
    31:             selinux_ctx_in,
    32:             symlink_target_id);
    33:     return v_id;
    34: exception when dup_val_on_index then
    35:     for r in lookup_cursor loop
    36:         return r.id;
    37:     end loop;
    38: end lookup_config_info;