Last active
January 29, 2021 23:53
-
-
Save Gavinok/0c41f8232a5cf3684522c38f22de01c7 to your computer and use it in GitHub Desktop.
demo tsql a troff preprocessor for using sqlite in troff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.\" cat THISFILE | tsql | tbl | groff -Tpdf > THISFILE.pdf | |
Store info | |
.sqldb :memory: | |
.sqlbeg | |
create table Fam ( | |
name text, | |
id integer | |
primary key | |
); | |
insert into Fam (name) values ('Gavin'), ('Chris'), ('Greg'); | |
.sqlend | |
.TS | |
allbox; | |
cc. | |
name id | |
.sqltbl | |
select * from Fam; | |
.sqlend | |
.TE | |
.nr id 5 | |
\n[id] | |
\"{{{ | |
.sqlnr id | |
select id from Fam where name = 'Chris'; | |
.sqlend | |
\n[id] | |
.sqlds name | |
select name from Fam where id = 2; | |
.sqlend | |
\*[name] | |
\"}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment