ad_table_column_list (public, deprecated)

 ad_table_column_list [ -sortable sortable ] datadef columns

Defined in packages/acs-tcl/tcl/deprecated-procs.tcl

Deprecated. Invoking this procedure generates a warning.

build a list of pointers into the list of column definitions

returns a list of indexes into the columns one per column it found

-sortable from t/f/all

Switches:
-sortable (optional, defaults to "all")
Parameters:
datadef (required)
columns (required)
See Also:

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc ad_table_column_list
    set column_list {}
    if {$columns eq ""} {
        for {set i 0} {$i < [llength $datadef]} {incr i} {
            if {$sortable eq "all"
                || ($sortable == "t" && [lindex $datadef $i 2] ne "no_sort")
                || ($sortable == "f" && [lindex $datadef $i 2] eq "no_sort")
            } {
                lappend column_list $i
            }
        }
    } else {
        set colnames {}
        foreach col $datadef {
            if {$sortable eq "all"
                || ($sortable == "t" && [lindex $col 2] ne "no_sort")
                || ($sortable == "f" && [lindex $col 2] eq "no_sort")
            } {
                lappend colnames [lindex $col 0]
            } else {
                # placeholder for invalid column
                lappend colnames "X+X"
            }
        }
        foreach col $columns {
            set i [lsearch $colnames $col]
            if {$i > -1} {
                lappend column_list $i
            }
        }
    }

    return $column_list
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/deprecated-procs.xql

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