xo::db::postgresql instproc map_datatype (public)

 <instance of xo::db::postgresql[i]> map_datatype type

Defined in /var/www/openacs/packages/xotcl-core/tcl/05-db-procs.tcl

Map an OpenACS datatype to its PostgreSQL representation. Delegate unhandled types to the next method.

Parameters:
type (required)
OpenACS datatype.

Testcases:
xotcl_core_tutorial_2
Source code:
switch -- $type {
  string    { set type text }
  long_text { set type text }
  date      { set type "timestamp with timezone" }
  ltree     { set type [expr {[::xo::dc has_ltree] ? "ltree" : "text" }] }
  default   { return [next] }
}
return $type
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: