Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 585 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 585 Bytes

database as program

Inspired by https://www.tcl.tk/community/tcl2004/Papers/D.RichardHipp/drh.html

Execute script

./init.sh

Show schema of db

sqlite3 --ascii --batch app.db ".schema"

Show procedures saved in db

sqlite3 --box --batch app.db "SELECT * FROM procedures;"

Insert procedure

INSERT INTO procedures (name,arguments,body) VALUES ('::hello','name','puts "Hi $name."');

Update procedure via editor

UPDATE procedures SET body=edit(body,'nano') WHERE id LIKE '01G2XRV8BVRY36Q3ETV67MY893';