% tar xf hisqry-1.20211003.tbz2 % cd hisqry-1.20211003/src/single % make c++ -o hisqry.pm -std=c++17 -O3 -I.. -I../type -I../db -I../opr -I../eng -I../psr -I../sql -I../hisqry -I/usr/local/include single.cpp -L/usr/local/lib -ledit -lboost_program_options % ./hisqry.pm SELECT (1), (2), (3); [string:1] [string:2] [string:3] CREATE TABLE hisqry ( major INT, minor INT ); INSERT INTO hisqry VALUES ( 1, 20211003 ); SELECT * FROM hisqry; major minor [integer:1] [integer:20211003] ^D % Start with --debug: --debug prints parsed values into internal strucutres % ./hisqry.pm --debug INSERT INTO table VALUES ( 1, 2, 'three' ); IN: INSERT INTO table VALUES ( 1, 2, 'three' ); INSERT INTO table VALUES ( 1, 2, 'three' ); insert: tablename: [table] columns[ ] values:[[i:1][i:2][i:three]] ERROR: no such table exists: 'table' % Start with a database SQL file: % touch history.sql % ./hisqry.pm --sql-db-file history.sql CREATE TABLE integers ( value INTEGER ); INSERT INTO integers VALUES ( 0 ), ( 1 ), ( 2 ), ( 3 ), ( 5 ), ( 8 ), ( 13 ); Start as a server and accept connection on port 11235 % ./hisqry.pm --port 11235 Connect to port 11235 using "telnet" and send SQL statements % telnet localhost 11235 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. CREATE TABLE integers ( value INTEGER ); INSERT INTO integers VALUES ( 0 ), ( 1 ), ( 2 ), ( 3 ), ( 5 ), ( 8 ), ( 13 ); ^] telnet> quit Connection closed.