::sqawk # 25:namespace eval ::sqawk {} ::snit::type ::sqawk::sqawk tables defaultTableNames abcdefghijklmnopqrstuvwxyz formatToParser formatToSerializer database ofs ors destroytables default true outputformat default awk parsers default configuremethod Set-and-update-format-list serializers default configuremethod Set-and-update-format-list constructor # 46: constructor {} { self configure parsers children ::sqawk::parsers self configure serializers children ::sqawk::serializers destructor # 52: destructor { self cget destroytables _ tableObj tables tableObj method # 62: method Set-and-update-format-list { Set-and-update-format-list value optToDict parsers formatToParser serializers formatToSerializer possibleOpts keys optToDict ni possibleOpts value dictName get optToDict dictName ns value ns ::formats dictName ns method # 84: method Parse { Parse data fileOptions ns get formatToParser parseOptions ns ::options ns ::parse data ::sqawk::override-keys parseOptions fileOptions method # 97: method Serialize { Serialize data sqawkOptions splitFormat formatName splitFormat formatOptions splitFormat end key value formatOptions key value ns get formatToSerializer formatName formatName so ns ::options formatName eq awk exists formatOptions ofs to the field separator the output please use the command line instead of the exists formatOptions ors to the record separator the output please use the command line instead of the so ofs get sqawkOptions ofs so ors get sqawkOptions ors key value formatOptions exists so key so key value formatName key ns ::serialize data so method # 149: method read-file fileOptions { read-file fileOptions defaultTableName defaultTableNames size tables ::sqawk::dict-ensure-default fileOptions table defaultTableName ::sqawk::dict-ensure-default fileOptions F0 ::sqawk::dict-ensure-default fileOptions csvquote ::sqawk::dict-ensure-default fileOptions csvsep ::sqawk::dict-ensure-default fileOptions awk ::sqawk::dict-ensure-default fileOptions merge ::sqawk::dict-ensure-default fileOptions prefix get fileOptions table metadata fileOptions exists metadata channel ch metadata channel metadata eq ch stdin ch metadata raw ch ch rows self Parse metadata raw fileOptions raw newTable ::sqawk::table create %AUTO% newTable configure database self cget database dbtable metadata table columnprefix metadata prefix f0 metadata F0 maxnf metadata NF modenf metadata MNF exists metadata datatypes newTable configure datatypes metadata datatypes header exists metadata header metadata header rows rows headerF0 header headerF0 end exists metadata columns customColumnNames metadata columns header customColumnNames customColumnNames header customColumnNames end newTable configure header header newTable initialize newTable insert-rows rows tables metadata table newTable newTable method # 220: method perform-query { perform-query query channel stdout outputRecords self cget database query results outputRecord keys results key keys outputRecord key results key outputRecords outputRecord sqawkOptions self sqawkOptions self cget output self Serialize self cget outputformat outputRecords sqawkOptions nonewline channel output