nsmcp::EpisodeOverview method options (protected)

 <instance of nsmcp::EpisodeOverview[i]> options arguments

Defined in /usr/local/ns/tcl/nsmcp/episode-overview.tcl

Parameters:
arguments (required)

Testcases:
No testcase defined.
Source code:
if {[lindex $arguments 1] ne "object"} {
    error "Expected an arguments object"
}
set options {hours 24 pool all}
set seen {}
foreach {key type value} [lindex $arguments 2] {
    switch -- $key {
        hours {
            if {$type ne "number" || ![string is integer -strict $value] || $value ni {1 6 24}} {
                error "hours must be 1, 6 or 24"
            }
        }
        pool {
            if {$type ne "string" || ![regexp {^[A-Za-z0-9_.-]{1,64}$} $value]} {
                error "pool must be an exact pool name or all"
            }
        }
        default {error "Unknown episode_overview argument: $key"}
    }
    if {$key in $seen} {error "Duplicate argument: $key"}
    lappend seen $key
    dict set options $key $value
}
return $options
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: