etp::get_attribute_lookup_sql (public)

 etp::get_attribute_lookup_sql attribute_desc

Defined in packages/edit-this-page/tcl/etp-procs.tcl

Parameters:
attribute_desc

Partial Call Graph (max 5 caller/called nodes):
%3 etp::get_content_items etp::get_content_items (public) etp::get_attribute_lookup_sql etp::get_attribute_lookup_sql etp::get_content_items->etp::get_attribute_lookup_sql etp::get_ext_attribute_columns etp::get_ext_attribute_columns (public) etp::get_ext_attribute_columns->etp::get_attribute_lookup_sql db_map db_map (public) etp::get_attribute_lookup_sql->db_map etp::get_attribute_default etp::get_attribute_default (public) etp::get_attribute_lookup_sql->etp::get_attribute_default etp::get_attribute_id etp::get_attribute_id (public) etp::get_attribute_lookup_sql->etp::get_attribute_id etp::get_attribute_name etp::get_attribute_name (public) etp::get_attribute_lookup_sql->etp::get_attribute_name

Testcases:
No testcase defined.
Source code:
    set attribute_id [etp::get_attribute_id $attribute_desc]
    set attribute_name [etp::get_attribute_name $attribute_desc]
    set default [etp::get_attribute_default $attribute_desc]

    set lookup_sql [db_map lookup_sql_clause]

    # see if a select-list callback function was specified
    if { [info commands $default] ne "" } {
    set transformed_lookup_sql [eval $default transform_during_query $attribute_id {$lookup_sql}]

    if {$transformed_lookup_sql ne ""} {
        set lookup_sql $transformed_lookup_sql
    }
    }
    return "$lookup_sql as $attribute_name"
Generic XQL file:
packages/edit-this-page/tcl/etp-procs.xql

PostgreSQL XQL file:
<fullquery name="etp::get_attribute_lookup_sql.lookup_sql_clause">
    <querytext>
    etp__get_attribute_value(r.revision_id, $attribute_id)
  </querytext>
</fullquery>
packages/edit-this-page/tcl/etp-procs-postgresql.xql

Oracle XQL file:
<fullquery name="etp::get_attribute_lookup_sql.lookup_sql_clause">
    <querytext>
    etp.get_attribute_value(r.revision_id, $attribute_id)
  </querytext>
</fullquery>
packages/edit-this-page/tcl/etp-procs-oracle.xql

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