template::list::page_get_ids (public)

 template::list::page_get_ids -name name [ -tcl_list ]

Defined in packages/acs-templating/tcl/list-procs.tcl

Switches:
-name (required)
Name of the list builder list for which you want the IDs of the current page.
-tcl_list (optional, boolean)
Set this option if you want the IDs as a Tcl list. Otherwise, they'll be returned as a quoted SQL list, ready to be included in an "where foo_id in (...)" expression.

Partial Call Graph (max 5 caller/called nodes):
%3 Class ::Generic::List Class ::Generic::List (public) template::list::page_get_ids template::list::page_get_ids Class ::Generic::List->template::list::page_get_ids template::list::page_where_clause template::list::page_where_clause (public) template::list::page_where_clause->template::list::page_get_ids ns_dbquotelist ns_dbquotelist template::list::page_get_ids->ns_dbquotelist template::list::get_reference template::list::get_reference (public) template::list::page_get_ids->template::list::get_reference template::paginator template::paginator (public) template::list::page_get_ids->template::paginator

Testcases:
No testcase defined.
Source code:
    # Get an upvar'd reference to list_properties
    get_reference -name $name

    if { $list_properties(page_size) eq "" || $list_properties(page_size) == 0 } {
        return {}
    }

    set ids [template::paginator get_row_ids $list_properties(paginator_name) $list_properties(filter,page)]

    if { $tcl_list_p } {
        return $ids
    } else {
        if { [llength $ids] == 0 } {
            return NULL
        }
        return [::ns_dbquotelist $ids]
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: