attribute::translate_datatype (public)

 attribute::translate_datatype datatype

Defined in packages/acs-subsite/tcl/attribute-procs.tcl

translates the datatype into one that can be validated. Default datatype is text (when no validator is found)

Parameters:
datatype (required)
Author:
Michael Bryzek <mbryzek@arsdigita.com>
Created:
12/2000

Testcases:
acs_subsite_attribute_datatypes
Source code:
        if { [datatype_validator_exists_p $datatype] } {
            return $datatype
        }
        switch -- $datatype {
            boolean { set datatype "text" }
            keyword { set datatype "text" }
            money { set datatype "integer" }
            number { set datatype "integer" }
            string { set datatype "text" }
        }
        if { [datatype_validator_exists_p $datatype] } {
            return $datatype
        }
        # No validator exists... return text as default
        return "text"
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

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