##########################################################################
# 2016 Jan 27
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
###########################################################################
###########################################################################
# Command line options processor. This is generic code that can be copied
# between scripts.
#
;# namespace eval cmdline
# End of command line options processor.
###########################################################################
###########################################################################
process_cmdline
# If -fts4 was specified, use fts4. Otherwise, fts5.
if else
sqlite3 db $A(database)
# Create the FTS table in the db. Return a list of the table columns.
#
# Return a list of tokens from the named file.
#
# Load all the data into a big list of tokens.
#
set tokens
foreach f $A(file)
set N
set i 0
set cols
set sql "INSERT INTO $A(tblname) VALUES(\$R()"
foreach c
append sql ")"
if
while
if