Tgdbm is a wrapper for the GNU-version of dbm (gdbm) which stores
key/value-pairs in cross-platform-files by using extendible hashing.
Qgdbm is build on top of Tgdbm and provides a convenient way to
store and retrieve data in an tclish- SQL-like style. Qgdbm is written
in pure Tcl-Code and can be used to store small/medium amounts of data
in table-files.
Qgdbm provides high-level commands for creating, dropping tables and
users and for manipulating rows of data (e.g.: insert, delete, ...).
Changes from version 0.4:
You can now "attach" an array-variable to the gdbm-handle. This
allows persistant tcl-arrays. The Tcl-Array-Commands are used to store
or retrieve entries from a gdbm-file.
A simple example would be:
gdbm_open -writer -sync -array airports test.gdbm
set airports(PAR) Paris ;# will store or update the key/value to test.gdbm
# add/update some more data
array set airports {
ADD "Addis Abeba"
FFM "Frankfurt"
}
# print value (gdbm-file and array is synchronized)
puts "FFM: [airports fetch FFM] / $airports(FFM)"
unset airports ;# this will close test.gdbm
;# this could have be done with unset airportArray
The distribution contains a simple gdbm-viewer (tests/demo.tcl) which
uses Dr. Casa Nemethi's Tablelistwidget (Thanks to Dr. Casa Nemethi
for this cool widget).
The distribution (Tgdbm and windows-port of gdbm 1.8.3) can be found
at:
http://www.vogel-nest.de/tcl/tgdbm
This was a quick release, so don't hesitate to contact me for any
hints, bugs, improvement.
--
Stefan Vogel
stefan dot vogel at avinci dot de
[[Send Tcl/Tk announcements to tcl-an...@mitchell.org
Announcements archived at http://groups.yahoo.com/group/tcl_announce/
Send administrivia to tcl-announ...@mitchell.org
Tcl/Tk at http://tcl.tk/ ]]