- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::db::sql::time_interval
::xo::db::sql::time_interval create ...
Defined in
Class Relations
::xo::db::Class create ::xo::db::sql::time_interval \ -superclass ::xotcl::ObjectMethods (to be applied on the object)
copy (scripted, public)
xo::db::sql::time_interval copy [ -dbn dbn ] -interval_id interval_id \ [ -offset offset ]Automatically generated method
- Switches:
- -dbn (optional)
- -interval_id (required)
- -offset (optional, defaults to
"0"
)- Testcases:
- No testcase defined.
#function_args: {INTERVAL_ID {}} {OFFSET 0} foreach var [list INTERVAL_ID OFFSET] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select time_interval__copy($_INTERVAL_ID, $_OFFSET) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }delete (scripted, public)
xo::db::sql::time_interval delete [ -dbn dbn ] \ -interval_id interval_idAutomatically generated method
- Switches:
- -dbn (optional)
- -interval_id (required)
- Testcases:
- No testcase defined.
#function_args: {INTERVAL_ID {}} foreach var [list INTERVAL_ID] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select time_interval__delete($_INTERVAL_ID) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }edit (scripted, public)
xo::db::sql::time_interval edit [ -dbn dbn ] -interval_id interval_id \ [ -start_date start_date ] [ -end_date end_date ]Automatically generated method
- Switches:
- -dbn (optional)
- -interval_id (required)
- -start_date (optional)
- -end_date (optional)
- Testcases:
- No testcase defined.
#function_args: {INTERVAL_ID {}} {START_DATE null} {END_DATE null} foreach var [list INTERVAL_ID START_DATE END_DATE] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select time_interval__edit($_INTERVAL_ID, $_START_DATE, $_END_DATE) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }eq (scripted, public)
xo::db::sql::time_interval eq [ -dbn dbn ] \ -interval_1_id interval_1_id -interval_2_id interval_2_idAutomatically generated method
- Switches:
- -dbn (optional)
- -interval_1_id (required)
- -interval_2_id (required)
- Testcases:
- No testcase defined.
#function_args: {INTERVAL_1_ID {}} {INTERVAL_2_ID {}} foreach var [list INTERVAL_1_ID INTERVAL_2_ID] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select time_interval__eq($_INTERVAL_1_ID, $_INTERVAL_2_ID) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }new (scripted, public)
xo::db::sql::time_interval new [ -dbn dbn ] [ -start_date start_date ] \ [ -end_date end_date ] [ -childof childof ]Automatically generated method
- Switches:
- -dbn (optional)
- -start_date (optional)
- -end_date (optional)
- -childof (optional)
- Testcases:
- No testcase defined.
#function_args: {START_DATE null} {END_DATE null} foreach var [list START_DATE END_DATE] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select time_interval__new($_START_DATE, $_END_DATE) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }overlaps_p (scripted, public)
xo::db::sql::time_interval overlaps_p [ -dbn dbn ] -start_1 start_1 \ -end_1 end_1 -start_2 start_2 -end_2 end_2Automatically generated method
- Switches:
- -dbn (optional)
- -start_1 (required)
- -end_1 (required)
- -start_2 (required)
- -end_2 (required)
- Testcases:
- No testcase defined.
#function_args: {START_1 {}} {END_1 {}} {START_2 {}} {END_2 {}} foreach var [list START_1 END_1 START_2 END_2] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select time_interval__overlaps_p($_START_1, $_END_1, $_START_2, $_END_2) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }shift (scripted, public)
xo::db::sql::time_interval shift [ -dbn dbn ] \ -interval_id interval_id [ -start_offset start_offset ] \ [ -end_offset end_offset ]Automatically generated method
- Switches:
- -dbn (optional)
- -interval_id (required)
- -start_offset (optional, defaults to
"0"
)- -end_offset (optional, defaults to
"0"
)- Testcases:
- No testcase defined.
#function_args: {INTERVAL_ID {}} {START_OFFSET 0} {END_OFFSET 0} foreach var [list INTERVAL_ID START_OFFSET END_OFFSET] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select time_interval__shift($_INTERVAL_ID, $_START_OFFSET, $_END_OFFSET) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables