== DBNAME == _fields[ [ '|soupName|, 'String ], [ '|fieldName|, 'String ], [ '|fieldType|, 'String ], [ '|indexed|, 'Boolean ], [ '|table|, 'String ], [ '|linkSoup|, 'String ], [ '|linkField|, 'String ], [ '|linkCondition|, 'code ], [ '|fieldWidth|, 'Int ], [ '|fieldFlags|, 'Int ], [ '|defaultValue|, 'String ], [ '|code|, 'code ], [ '|decimals|, 'Int ], [ '|pKey|, 'Boolean ] ]mileage	start	int						0	0			0	mileage	from	string		places				0	0			0	mileage	to	string		places				0	0		if not e.|from| or StrLen(e.|from|) = 0 or not e.|to| or StrLen(e.|to|)=0 then return nil;\nlocal ds := :OpenSoup("distances");\nif not ds then return nil;\nlocal dc := Query(ds,{type:'index,indexpath: '|from|,startkey:e.|from|,validtest:func(de) strequal(de.|to|,e.|to|), endtest: func(de) not strequal(de.|from|,e.|from|)});\nif not dc or not dc:entry() then return nil;\ne.miles := dc:entry().distance;\nif not e.final or e.final = 0 then\n\te.final := e.start + e.miles;\nreturn true;	0	mileage	date	date	true					0	0	today		0	mileage	miles	int						0	0		e.final := e.start + e.miles;\nif not e.|from| or StrLen(e.|from|) = 0 or not e.|to| or StrLen(e.|to|)=0 then return true;\nlocal ds := :OpenSoup("distances");\nlocal dc := Query(ds,{type:'index,indexpath: '|from|,startkey:e.|from|,validtest:func(de) strequal(de.|to|,e.|to|), endtest: func(de) not strequal(de.|from|,e.|from|)});\nif dc and not dc:entry() then ds:AddToDefaultStore({|from|: e.|from|, |to|: e.|to|, distance: e.miles});\nreturn true;	0	mileage	purpose	string						0	0			0	mileage	final	int						0	0		e.miles := e.final - e.start;\nif not e.|from| or StrLen(e.|from|) = 0 or not e.|to| or StrLen(e.|to|)=0 then return true;\nlocal ds := :OpenSoup("distances");\nlocal dc := Query(ds,{type:'index,indexpath: '|from|,startkey:e.|from|,validtest:func(de) strequal(de.|to|,e.|to|), endtest: func(de) not strequal(de.|from|,e.|from|)});\nif dc and not dc:entry() then ds:AddToDefaultStore({|from|: e.|from|, |to|: e.|to|, distance: e.miles});\nreturn true;	0	mileage	note	text						0	0			0	mileage	Business	Boolean						0	0			0	== EOD ==== DBNAME == mileage[ [ '|start|, 'Int ], [ '|from|, 'String ], [ '|to|, 'String ], [ '|Date|, 'Date ], [ '|miles|, 'Int ], [ '|purpose|, 'String ], [ '|final|, 'Int ], [ '|note|, 'text ], [ '|Business|, 'Boolean ] ]== EOD ==== DBNAME == _tables[ [ '|tblName|, 'String ], [ '|tblDisplay|, 'String ], [ '|tblStore|, 'Int ] ]places	home	0places	downtown	1places	Austin	2places	Houston	3places	San Antonio	4places	Dallas	5places	Beaumont	6== EOD ==== DBNAME == _queries[ [ '|qName|, 'String ], [ '|soup|, 'String ] ]business	mileage== EOD ==== DBNAME == _criteria[ [ '|Query|, 'String ], [ '|soup|, 'String ], [ '|field|, 'String ], [ '|comparison|, 'String ], [ '|value|, 'String ] ]business	mileage	Business	=	true== EOD ==== DBNAME == _views[ [ '|viewName|, 'String ], [ '|soup|, 'String ] ]mileage	mileage== EOD ==== DBNAME == _columns[ [ '|view|, 'String ], [ '|column|, 'Int ], [ '|soup|, 'String ], [ '|field|, 'String ], [ '|width|, 'Int ], [ '|summary|, 'String ] ]mileage	1	mileage	Date	35	mileage	2	mileage	from	34	mileage	3	mileage	to	34	mileage	4	mileage	miles	33	mileage	5	mileage	purpose	0	mileage	6	mileage	Business	0	== EOD ==== DBNAME == _fields[ [ '|soupName|, 'String ], [ '|fieldName|, 'String ], [ '|fieldType|, 'String ], [ '|indexed|, 'Boolean ], [ '|table|, 'String ], [ '|linkSoup|, 'String ], [ '|linkField|, 'String ], [ '|fieldWidth|, 'Int ], [ '|fieldFlags|, 'Int ], [ '|linkCondition|, 'code ], [ '|defaultValue|, 'String ], [ '|code|, 'code ], [ '|decimals|, 'Int ], [ '|pKey|, 'Boolean ] ]distances	from	string	true	places				0					distances	to	string		places				0					distances	distance	int						0					== EOD ==== DBNAME == distances[ [ '|from|, 'String ], [ '|to|, 'String ], [ '|distance|, 'Int ] ]Austin	Houston	170Austin	Beaumont	250Austin	San Antonio	95Dallas	Austin	200== EOD ==== EOD ==