db_columns (public)
db_columns [ -dbn dbn ] table_name
Defined in packages/acs-tcl/tcl/01-database-procs.tcl
- Switches:
- -dbn (optional)
- The database name to use. If empty_string, uses the default database.
- Parameters:
- table_name (required)
- Returns:
- a Tcl list of all the columns in the table with the given name.
- Author:
- Lars Pind <lars@pinds.com>
- Changelog:
- yon@arsdigita.com 20000711 changed to return lowercase column names
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- datamodel__acs_attribute_check
Source code: set columns [list] # Works for both Oracle and PostgreSQL: db_foreach -dbn $dbn table_column_names { select lower(column_name) as column_name from user_tab_columns where table_name = upper(:table_name) } { lappend columns $column_name } return $columnsXQL Not present: Generic, PostgreSQL, Oracle