You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by da...@apache.org on 2004/01/15 15:01:11 UTC

cvs commit: tcl-rivet/rivet/packages/simpledb simpledb.tcl simpledb.test

davidw      2004/01/15 06:01:11

  Modified:    .        ChangeLog
               rivet/packages/simpledb simpledb.tcl simpledb.test
  Log:
  * rivet/packages/simpledb/simpledb.tcl (simpledb::synctostorage):
    Added fix from Massimo Manghi <ma...@biol.unipr.it> for bug in
    procedure to write database to disk.
  
  * rivet/packages/simpledb/simpledb.test (populatetables): Commented
    out stuff to add into the test later.
  
  Revision  Changes    Path
  1.156     +9 -0      tcl-rivet/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/ChangeLog,v
  retrieving revision 1.155
  retrieving revision 1.156
  diff -u -r1.155 -r1.156
  --- ChangeLog	12 Jan 2004 16:08:25 -0000	1.155
  +++ ChangeLog	15 Jan 2004 14:01:11 -0000	1.156
  @@ -1,3 +1,12 @@
  +2004-01-15  David N. Welton  <da...@dedasys.com>
  +
  +	* rivet/packages/simpledb/simpledb.tcl (simpledb::synctostorage):
  +	Added fix from Massimo Manghi <ma...@biol.unipr.it> for bug in
  +	procedure to write database to disk.
  +
  +	* rivet/packages/simpledb/simpledb.test (populatetables):
  +	Commented out stuff to add into the test later.
  +
   2004-01-08  David N. Welton  <da...@dedasys.com>
   
   	* src/make.tcl: Added warning to default make.tcl target in order
  
  
  
  1.2       +9 -7      tcl-rivet/rivet/packages/simpledb/simpledb.tcl
  
  Index: simpledb.tcl
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/rivet/packages/simpledb/simpledb.tcl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- simpledb.tcl	29 Sep 2003 13:09:35 -0000	1.1
  +++ simpledb.tcl	15 Jan 2004 14:01:11 -0000	1.2
  @@ -277,15 +277,17 @@
   
   proc simpledb::synctostorage {savefile} {
       set fl [open $savefile w]
  -    set collist [array names ${ns}::cols]
       foreach ns [namespace children] {
  +	# Let's store the goodoids array.
  +	set collist [array names ${ns}::cols]
   	puts $fl "namespace eval $ns \{"
  -	puts $fl "array set cols [array get ${ns}::cols]"
  +	puts $fl "    array set cols \{ [array get ${ns}::cols] \}"
  +	puts $fl "    array set goodoids \{ [array get ${ns}::goodoids] \}".
   	foreach col $collist {
  -	    puts $fl "namespace eval ${col} \{"
  -	    puts $fl "array set data [list [array get ${ns}::${col}::data]]"
  -	    puts $fl "array set values [list [array get ${ns}::${col}::values]]"
  -	    puts $fl "\}"
  +	    puts $fl "    namespace eval ${col} \{"
  +	    puts $fl "        array set data [list [array get ${ns}::${col}::data]]"
  +	    puts $fl "        array set values [list [array get ${ns}::${col}::values]]"
  +	    puts $fl "    \}"
   	}
   	puts $fl "\}"
       }
  
  
  
  1.2       +27 -27    tcl-rivet/rivet/packages/simpledb/simpledb.test
  
  Index: simpledb.test
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/rivet/packages/simpledb/simpledb.test,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- simpledb.test	29 Sep 2003 13:09:35 -0000	1.1
  +++ simpledb.test	15 Jan 2004 14:01:11 -0000	1.2
  @@ -73,34 +73,34 @@
       set res {}
       maketables
       populatetables
  -} {}
  +} {3}
   
  -foreach arr [simpledb::items computer] {
  -    lappend arrlist [arraysort $arr]
  -}
  -puts [lsort -index 9 $arrlist]
  -
  -simpledb::setitem computer $lt3 {
  -    price 2000
  -}
  -
  -simpledb::setitem computer $lt3 {
  -    price 3000
  -}
  -
  -puts "getitem computer lt1: [simpledb::getitem computer $lt1]"
  -
  -puts "finditems: [simpledb::finditems computer {
  -    gfx Permedia
  -    cpu PII
  -}]"
  -
  -foreach item [simpledb::finditems computer {
  -    gfx *
  -}] {
  -    puts [simpledb::getitem computer $item]
  -}
  +# foreach arr [simpledb::items computer] {
  +#     lappend arrlist [arraysort $arr]
  +# }
  +# puts [lsort -index 9 $arrlist]
  +
  +# simpledb::setitem computer $lt3 {
  +#     price 2000
  +# }
  +
  +# simpledb::setitem computer $lt3 {
  +#     price 3000
  +# }
  +
  +# puts "getitem computer lt1: [simpledb::getitem computer $lt1]"
  +
  +# puts "finditems: [simpledb::finditems computer {
  +#     gfx Permedia
  +#     cpu PII
  +# }]"
  +
  +# foreach item [simpledb::finditems computer {
  +#     gfx *
  +# }] {
  +#     puts [simpledb::getitem computer $item]
  +# }
   
  -simpledb::synctostorage session.tcl
  +# simpledb::synctostorage session.tcl
   
   tcltest::cleanupTests
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org