nsmcp::QuestionBackend object method usageCounters (public)

 nsmcp::QuestionBackend[i] usageCounters value mapping

Defined in /usr/local/ns/tcl/nsmcp/question-backend.tcl

Extract bounded integer usage counters.

Parameters:
value (required)
Provider usage dictionary.
mapping (required)
Alternating provider keys and normalized names.
Returns:
A dictionary containing valid counters under normalized names.

Testcases:
No testcase defined.
Source code:
set result {}
if {[catch {
    dict size $value
}]} {
    return $result
}
foreach {providerKey key} $mapping {
    if {[dict exists $value $providerKey]} {
        set n [dict get $value $providerKey]
        if {[string is wideinteger -strict $n] && $n >= 0 && $n <= 1000000000000000} {
            dict set result $key $n
        }
    }
}
return $result
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: