auth::driver::set_parameter_value (public)

 auth::driver::set_parameter_value -authority_id authority_id \
    -impl_id impl_id -parameter parameter -value value

Defined in packages/acs-authentication/tcl/driver-procs.tcl

Updates the parameter value in the database.

Switches:
-authority_id (required)
-impl_id (required)
-parameter (required)
-value (required)
Author:
Simon Carstensen <simon@collaboraid.biz>
Created:
2003-08-27

Testcases:
auth_driver_get_parameter_values, sync_batch_ims_test
Source code:
    set exists_p [db_string param_exists_p {}]

    if { $exists_p } {
        db_dml update_parameter {} -clobs [list $value]
    } else {
        db_dml insert_parameter {} -clobs [list $value]
    }
Generic XQL file:
<fullquery name="auth::driver::set_parameter_value.param_exists_p">
    <querytext>
            select count(*) 
            from   auth_driver_params
            where  impl_id = :impl_id
            and    authority_id = :authority_id
            and    key = :parameter
        </querytext>
</fullquery>
packages/acs-authentication/tcl/driver-procs.xql

PostgreSQL XQL file:
<fullquery name="auth::driver::set_parameter_value.update_parameter">
    <querytext>            
            update auth_driver_params
            set    value = :value
            where  authority_id = :authority_id
            and    impl_id = :impl_id
            and    key = :parameter
        </querytext>
</fullquery>

<fullquery name="auth::driver::set_parameter_value.insert_parameter">
    <querytext>            
            insert into auth_driver_params (authority_id, impl_id, key, value)
            values (:authority_id, :impl_id, :parameter, :value)
        </querytext>
</fullquery>
packages/acs-authentication/tcl/driver-procs-postgresql.xql

Oracle XQL file:
<fullquery name="auth::driver::set_parameter_value.update_parameter">
    <querytext>            
            update auth_driver_params
            set    value = empty_clob()
            where  authority_id = :authority_id
            and    impl_id = :impl_id
            and    key = :parameter
            returning value into :1
        </querytext>
</fullquery>

<fullquery name="auth::driver::set_parameter_value.insert_parameter">
    <querytext>            
            insert into auth_driver_params (authority_id, impl_id, key, value)
            values (:authority_id, :impl_id, :parameter, empty_clob())
            returning value into :1
        </querytext>
</fullquery>
packages/acs-authentication/tcl/driver-procs-oracle.xql

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