- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::db::SQL
::xo::db::SQL create ...
Defined in
Class Relations
::xotcl::Class create ::xo::db::SQL \ -superclass ::xotcl::ObjectMethods (to be applied on instances)
datatype_constraint (scripted)
<instance of xo::db::SQL> datatype_constraint
- Testcases:
- xotcl_core_tutorial_2, xotcl-core
return ""date_trunc (scripted)
if {![::xotcl::self isnextcall]} { error "Abstract method date_trunc type called" } else {::xotcl::next}date_trunc_expression (scripted)
if {![::xotcl::self isnextcall]} { error "Abstract method date_trunc_expression type called" } else {::xotcl::next}fix_function_args (scripted)
# # Load fallback defaults for buggy function args. The values # provided here are only used for function args without specified # defaults. This is a transitional solution; actually, the # function args should be fixed. # if {![::xo::db::SQL exists fallback_defaults(${package_name}__$object_name)]} { return $function_args } array set additional_defaults [::xo::db::SQL set fallback_defaults(${package_name}__$object_name)] set result {} foreach arg $function_args { lassign $arg arg_name default_value if {$default_value eq "" && [info exists additional_defaults($arg_name)]} { lappend result [list $arg_name $additional_defaults($arg_name)] } else { lappend result [list $arg_name $default_value] } } return $resulthas_hstore (scripted)
return 0has_ltree (scripted)
return 0interval (scripted)
return [clock format [clock scan "-$interval"] -format "%Y-%m-%d %T"]map_datatype (scripted)
# # Map a generic datatype to a real datatype of the underlying # database management system. This function is typically refined # for concrete database systems. # # If a mapping is not found we keep the type unaltered, but this # will currently break acs_attributes_datatype_fk when creating # acs_attributes with an unmapped type. return [::xo::dc get_value map " select database_type from acs_datatypes where datatype = :type" $type]map_function_name (scripted)
return $sqlmk_sql_constraint_name (scripted)
return ${table}_${att}_$suffixselect (scripted)
if {![::xotcl::self isnextcall]} { error "Abstract method select type called" } else {::xotcl::next}since_interval_condition (scripted)
set since '[clock format [clock scan "-$interval"] -format "%Y-%m-%d %T"]' return "$var > TO_TIMESTAMP($since,'YYYY-MM-DD HH24:MI:SS')"sql_arg_info (scripted)
set defined {} set psql_args [list] set arg_order [list] foreach arg $function_args { lassign $arg arg_name default_value lappend psql_args \$_$arg_name lappend arg_order $arg_name lappend defined $arg_name $default_value } return [list psql_args [join $psql_args ", "] arg_order $arg_order defined $defined function_args $function_args]
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables