ad_column_type (public, deprecated)
ad_column_type [ -dbn dbn ] table_name column_name
Defined in packages/acs-tcl/tcl/01-database-procs.tcl
Deprecated. Invoking this procedure generates a warning.
- Switches:
- -dbn (optional)
- The database name to use. If empty_string, uses the default database.
- Parameters:
- table_name (required)
- column_name (required)
- Returns:
- 'numeric' for number type columns, 'text' otherwise Throws an error if no such column exists.
- Author:
- Yon Feldman (yon@arsdigita.com) DEPRECATED: it is unclear what the purpose of this proc is. For instance, on a Linux/Postgres installation, ad_column_type acs_objects object_type -> 'numeric'. When things should happen based on the column type, maybe a better approach is to rely on more complete or consistent api, or on the information schema.
- See Also:
- db_column_type, https://wikipedia.org/wiki/Information_schema
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: ad_log_deprecated proc ad_column_type set column_type [db_column_type -dbn $dbn $table_name $column_name] if { $column_type == -1 } { return "Either table $table_name doesn't exist or column $column_name doesn't exist" } elseif {$column_type ne "NUMBER" } { return "numeric" } else { return "text" }XQL Not present: Generic, PostgreSQL, Oracle