nsmcp::CodeUpstreamTool method candidates (protected)

 <instance of nsmcp::CodeUpstreamTool[i]> candidates selection local

Defined in /usr/local/ns/tcl/nsmcp/code-upstream.tcl

Parameters:
selection (required)
local (required)

Testcases:
No testcase defined.
Source code:
set rows {}; set i 0; set list [dict get $selection candidates]
set budget [expr {max(1,8192/[llength $list])}]
foreach candidate $list {
    set conditions {}; set j 0
    foreach condition [dict get $candidate conditions] {lappend conditions $j string $condition; incr j}
    set body [dict get $candidate body]
    lappend rows $i object [list candidate number $i form string [dict get $candidate form] conditions array $conditions comparison object [:comparison $local $candidate] bodyExcerpt string [string range $body 0 [expr {$budget-1}]] bodyExcerptTruncated boolean [expr {[string length $body]>$budget}]]
    incr i
}
return $rows
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: