content::type::attribute::new (public)

 content::type::attribute::new -content_type content_type \
    -attribute_name attribute_name -datatype datatype \
    -pretty_name pretty_name [ -pretty_plural pretty_plural ] \
    [ -sort_order sort_order ] [ -default_value default_value ] \
    [ -column_spec column_spec ]

Defined in packages/acs-content-repository/tcl/content-type-procs.tcl

Switches:
-content_type
(required)
-attribute_name
(required)
-datatype
(required)
-pretty_name
(required)
-pretty_plural
(optional)
-sort_order
(optional)
-default_value
(optional)
-column_spec
(optional)
Specification for column to pass to the database. Not optional if the column does not already exist in the table.
Returns:
attribute_id for created attribute

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item content_item (test acs-content-repository) content::type::attribute::new content::type::attribute::new test_content_item->content::type::attribute::new db_type db_type (public) content::type::attribute::new->db_type package_exec_plsql package_exec_plsql (public) content::type::attribute::new->package_exec_plsql

Testcases:
content_item
Source code:
    if {[db_type] eq "oracle"} {
    switch -- $column_spec {
        text { set column_spec clob }
        boolean { set column_spec "char(1)" }
    }
    } else {
    switch -- $column_spec {
        clob { set column_spec text }
    }
    }

    return [package_exec_plsql -var_list [list  [list content_type $content_type ]  [list attribute_name $attribute_name ]  [list datatype $datatype ]  [list pretty_name $pretty_name ]  [list pretty_plural $pretty_plural ]  [list sort_order $sort_order ]  [list default_value $default_value ]  [list column_spec $column_spec ]  ] content_type create_attribute]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-content-repository/tcl/content-type-procs.xql

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