mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Test: csvdump now scans all DBs.
This commit is contained in:
parent
a5a06a8ecd
commit
175707e550
@ -262,9 +262,11 @@ proc formatCommand {args} {
|
|||||||
|
|
||||||
proc csvdump r {
|
proc csvdump r {
|
||||||
set o {}
|
set o {}
|
||||||
|
for {set db 0} {$db < 16} {incr db} {
|
||||||
|
{*}$r select $db
|
||||||
foreach k [lsort [{*}$r keys *]] {
|
foreach k [lsort [{*}$r keys *]] {
|
||||||
set type [{*}$r type $k]
|
set type [{*}$r type $k]
|
||||||
append o [csvstring $k] , [csvstring $type] ,
|
append o [csvstring $db] , [csvstring $k] , [csvstring $type] ,
|
||||||
switch $type {
|
switch $type {
|
||||||
string {
|
string {
|
||||||
append o [csvstring [{*}$r get $k]] "\n"
|
append o [csvstring [{*}$r get $k]] "\n"
|
||||||
@ -302,6 +304,8 @@ proc csvdump r {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
{*}$r select 9
|
||||||
return $o
|
return $o
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user