From: Wolfgang W. <wol...@di...> - 2014-02-06 17:18:00
|
Hello! I've added a datatype "dict" to the list of possible DbiResults. "dicts" returns a list of dicts, whereas "dict" returns a dict. The keys for the first level is a simple counter. So instead of {user_id 1 user_name Max} {user_id 2 user_name Lisa} 1 {user_id 1 user_name Max} 2 {user_id 2 user_name Lisa} There is a slight performance hit compared to "dicts", but the result is more useful, as you can do the following: dict for {k v} $result { set user_id [dict get $v user_id] dict set result $k user_url "user?user_id=$user_id" } We are using dict result sets in our templating system frequently. With the patch we could switch to ns_dbi very easily and get the performance bonus with only a few hours of work. Regards, Wolfgang |