attribute::exists_p (public)
attribute::exists_p [ -convert_p convert_p ] object_type \ orig_attribute
Defined in packages/acs-subsite/tcl/attribute-procs.tcl
Returns 1 if the object type already has an attribute of the given name.
- Switches:
- -convert_p (optional, defaults to
"t"
)- If
t
, we convert the attribute using plsql_utility::generate_oracle_name- Parameters:
- object_type (required)
- orig_attribute (required)
- The attribute in which we are interested. Note that if
convert_p
is set tot
, we will internally look for the converted attribute name- Returns:
- 1 if the object type already has an attribute of the specified name. 0 otherwise
- Author:
- Michael Bryzek <mbryzek@arsdigita.com>
- Created:
- 12/2000
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_subsite_attributes
Source code: if { $convert_p == "t" } { set attribute [plsql_utility::generate_oracle_name $orig_attribute] } else { set attribute $orig_attribute } set attr_exists_p [db_string attr_exists_p { select 1 from acs_attributes a where (a.attribute_name = :attribute or a.column_name = :attribute) and a.object_type = :object_type } -default 0] if { $attr_exists_p || $convert_p == "f" } { return $attr_exists_p } return [exists_p -convert_p f $object_type $orig_attribute]Generic XQL file: packages/acs-subsite/tcl/attribute-procs.xql
PostgreSQL XQL file: packages/acs-subsite/tcl/attribute-procs-postgresql.xql
Oracle XQL file: packages/acs-subsite/tcl/attribute-procs-oracle.xql