rss_gen_bind (private)

 rss_gen_bind

Defined in packages/rss-support/tcl/rss-generation-service-procs.tcl

Creates bindings for unbound implementations for RssGenerationSubscriber.

Partial Call Graph (max 5 caller/called nodes):
%3 rss_gen_service rss_gen_service (private) rss_gen_bind rss_gen_bind rss_gen_service->rss_gen_bind db_exec_plsql db_exec_plsql (public) rss_gen_bind->db_exec_plsql db_foreach db_foreach (public) rss_gen_bind->db_foreach db_string db_string (public) rss_gen_bind->db_string

Testcases:
No testcase defined.
Source code:
    set contract_id [db_string get_contract_id {}]

    db_foreach get_unbound_impls {} {
        ns_log Debug "rss_gen_bind: binding impl $impl_id for contract $contract_id"
        # Don't ask me why, but bind variables don't appear to work
        # in this nested db operation.
        if {[catch {
            db_exec_plsql bind_impl {}
        } errMsg]} {
            ns_log Warning "rss_gen_bind: error binding impl $impl_id for contract $contract_id: $errMsg"
        }
    }
Generic XQL file:
<fullquery name="rss_gen_bind.get_unbound_impls">
    <querytext>
        select impl_id
        from acs_sc_impls i
        where impl_contract_name = 'RssGenerationSubscriber'
          and not exists (select 1
                          from acs_sc_bindings b
                          where b.impl_id = i.impl_id
                            and b.contract_id = :contract_id)
    </querytext>
</fullquery>
packages/rss-support/tcl/rss-generation-service-procs.xql

PostgreSQL XQL file:
<fullquery name="rss_gen_bind.get_contract_id">
    <querytext>
       	select acs_sc_contract__get_id('RssGenerationSubscriber')
    </querytext>
</fullquery>

<fullquery name="rss_gen_bind.bind_impl">
    <querytext>
         select acs_sc_binding__new(:contract_id,:impl_id)
    </querytext>
</fullquery>
packages/rss-support/tcl/rss-generation-service-procs-postgresql.xql

Oracle XQL file:
<fullquery name="rss_gen_bind.get_contract_id">
    <querytext>
	select acs_sc_contract.get_id('RssGenerationSubscriber') from dual
    </querytext>
</fullquery>

<fullquery name="rss_gen_bind.bind_impl">
    <querytext>
         begin  
             acs_sc_binding.new(
                 contract_id => :contract_id,
                impl_id => :impl_id
             );
         end;
    </querytext>
</fullquery>
packages/rss-support/tcl/rss-generation-service-procs-oracle.xql

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