preference::get_user_pref (public)

 preference::get_user_pref -preference_type preference_type \
    -package_id package_id -user_id user_id

Defined in packages/user-preferences/tcl/preference-procs.tcl

Get a user, package, or default preference. The preference can be obtained at four different levels:

package_id user_idReturns
package_id user_idUser preference for package_id (set with set_user_pref)
null user_idUser preference for all packages (set with set_user_pref)
package_id nullPackage default (set with set_package_default)
null nullSystem default (set with preference::type::new)
Note: null == empty string (""), ...

Switches:
-preference_type (required)
A short string that identifies the preference. This corresponds to the short_name parameter passed to preference::type::new.
-package_id (required)
This can be the real package id, or an empty string.
-user_id (required)
This can be the real user id, or an empty string.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 db_exec_plsql db_exec_plsql (public) preference::get_preference_type_id preference::get_preference_type_id (public) preference::get_user_pref preference::get_user_pref preference::get_user_pref->db_exec_plsql preference::get_user_pref->preference::get_preference_type_id

Testcases:
No testcase defined.
Source code:
        # get the preference type id
        set preference_type_id [get_preference_type_id -preference_type $preference_type]

        # exec the PL/SQL
        set pref [db_exec_plsql get_user_pref {}]

        return $pref
Generic XQL file:
packages/user-preferences/tcl/preference-procs.xql

PostgreSQL XQL file:
<fullquery name="preference::get_user_pref.get_user_pref">
    <querytext>
select user_pref_type__get_user_pref (
           :preference_type,
           :package_id,
           :user_id
      );
</querytext>
</fullquery>
packages/user-preferences/tcl/preference-procs-postgresql.xql

Oracle XQL file:
<fullquery name="preference::get_user_pref.get_user_pref">
    <querytext>
declare begin
:1 := user_pref_type.get_user_pref (
           preference_type_id => :preference_type_id,
           package_id => :package_id,
           user_id => :user_id
      );
end;
</querytext>
</fullquery>
packages/user-preferences/tcl/preference-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: