GEB Overview
Basic description
Spreadsheet-like display of db files and their tables
Other windows for blocks of code, single lines of Tcl or SQL, Alter Table, Views & Indices
Started off as a means of keeping data and Tcl code together
- Both stored in an SQLite database
- Tools provided to manipulate both
Grew into (fairly) full-featured database manipulation tool
(replacement for command-line tool)
- Many features added as I came to need them
- May or may not be a good fit for your way of working
- Has replaced SQLite CLI tool for me
Tables used
tclcode -- used for blocks of code and comments
- Must be present in main db, can have additional code tables in attached database files
- Keep code with the data it handles
- Could be one db row per proc, but I keep related procs together
- Code can be loaded through unknown handler (main.tclcode only),
programatically, or manually
- If a row with procname "init" is present (main or attached db), it gets loaded when the
table is read into the system
- If a row with procname "collate" is present in main.tclcode, it
gets loaded when "collation_needed"
cmd_history -- for command, search, replace, view, index history (i.e., one-liners)
tclrows (temp) -- used for keeping track of code in tclcode
tables
blobs (optional) -- used for storing binary files
GEB Windows -- click on thumbnail
File windows
Table windows
View and Index windows
Edit/Run window
Special purpose windows
Menus
File menu
Attach/detach file
Vacuum file
Import/export CSV file (\"normal\" database table)
Import/export text file (single-element table)
Import/export blob file (file name saved for restoring)
Table menu
New
Drop
Alter
Copy
Import/export CSV
Run
Single line of SQL
Single line of Tcl
. Both the above saved in cmd-history table
Help menu
Show this help
Itty Bitty Nitty Gritty
All procs and globals in GEB namespace
unknown handler looks in tclcode for undefined procs
. If there is row with procname value equal to the unqualified
undefined proc, eval the tcl value
. If that eval defines the proc, execute it with its original
arguments
All db metadate kept in a few global arrays
. Except names of entries in tclcode, which may need to be resorted
(so kept in TEMP db)
main.tclcode has a column for version which is currently ignored
. It may get used if I can decide what would be most useful