== 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 ] ] groceries item string true 0 0 groceries need boolean 0 0 if e.need then\n\te.cost := e.price\nelse begin\n\te.cost := 0;\n\te.date := time()\nend;\nreturn true; groceries date date true 0 0 groceries aisle int true 0 0 groceries type String gro-types type {type: 'index, indexPath: 'item, startKey: target.item, endTest: func(e) not StrEqual(e.item, target.item)} 0 0 if StrLen(e.type) = 0 then return nil;\nif not (ls := :OpenSoup("gro-types")) then return nil;\nif not (lc := query(ls, {type: 'index, indexPath: 'item, startkey: e.item, validtest: func(ent) strequal(ent.type, e.type), endtest: func(ent) not strequal(ent.item, e.item)})) then \n return nil;\nif not lc:entry() then ls:addtodefaultstore({item: e.item, type: e.type});\nreturn nil; groceries price real 0 2 groceries cost real 1 2 == EOD == == DBNAME == groceries [ [ '|item|, 'String ], [ '|need|, 'Boolean ], [ '|Date|, 'Date ], [ '|aisle|, 'Int ], [ '|type|, 'String ], [ '|price|, 'real ], [ '|cost|, 'real ] ] aluminum foil true 12/29/93 12 narrow 0.65 0.65 apples 10/4/94 5 golden delicious 0.45 0.00 batteries true 2/12/94 15 AAA rechargeable 4.98 4.98 biscuits 10/4/94 5 0.75 0.00 black eye peas true 11/16/93 4 jalape\u00f1\uo 0.39 0.39 bread true 9/14/93 3 1.15 1.15 butter 10/4/94 2 salted 1.60 0.00 cereal true 10/4/94 6 raisin bran 3.78 3.78 chips 10/4/94 4 1.90 0.00 chocolate chips true 11/8/93 6 1.98 1.98 cookies 10/4/94 5 1.70 0.00 corn 10/4/94 4 0.80 0.00 crab true 11/11/93 1 imitation 2.30 2.30 envelopes 15 0.00 0.00 fish true 11/8/93 1 roughy 4.75 4.75 flour 10/4/94 6 0.65 0.00 fruit true 10/4/94 9 pears 0.85 0.85 fruit juice 10/4/94 0 2.50 0.00 gumbo mix true 11/29/93 11 1.75 1.75 honey 10/4/94 12 1.25 0.00 hot chocolate 10/4/94 7 1.00 0.00 ice cream true 11/1/93 2 vanilla 3.70 3.70 laundry detergent 10/4/94 20 1.80 0.00 lettuce 10/4/94 0 green leaf 0.98 0.00 light bulbs 10/4/94 8 three way 1.65 0.00 lunch meat true 11/8/93 2 2.20 2.20 maple flavor 10/4/94 6 2.60 0.00 maple syrup 10/4/94 7 3.25 0.00 milk true 9/21/93 0 skim 2.05 2.05 motor oil true 2/16/94 0 1.10 1.10 mustard 10/4/94 0 dijon 1.90 0.00 nuts 10/4/94 0 cashews 3.85 0.00 orange juice 10/4/94 0 2.10 0.00 pancake mix 10/4/94 0 1.70 0.00 paper towels 10/4/94 0 0.65 0.00 peanut butter true 12/18/93 0 1.80 1.80 picante sauce 10/4/94 2 0.75 0.00 plastic wrap 10/4/94 0 0.85 0.00 pop corn 10/4/94 4 1.20 0.00 red beans & rice mix true 11/11/93 2 2.20 2.20 saline solution 10/4/94 0 2.00 0.00 sausage 10/4/94 0 2.07 0.00 shampoo 10/4/94 0 1.00 0.00 shortening 10/4/94 0 1.25 0.00 soap 10/4/94 0 0.82 0.00 sodas true 11/16/93 0 orange 1.98 1.98 soup 10/4/94 0 0.85 0.00 spaghetti 10/4/94 13 1.15 0.00 spinach 10/4/94 0 0.90 0.00 strawberry preserves 10/4/94 0 1.95 0.00 sugar 10/4/94 0 0.65 0.00 sweet potatoes true 11/8/93 0 0.80 0.80 tissue 10/4/94 0 0.60 0.00 toilet paper 10/4/94 0 0.80 0.00 tomatoes true 4/27/94 0 0.85 0.85 tooth paste 10/4/94 0 1.50 0.00 vanilla 10/4/94 0 2.50 0.00 video tape 10/4/94 0 4.98 0.00 vinegar 10/4/94 0 0.60 0.00 == EOD == == DBNAME == _queries [ [ '|qName|, 'String ], [ '|soup|, 'String ] ] needed groceries == EOD == == DBNAME == _criteria [ [ '|Query|, 'String ], [ '|soup|, 'String ], [ '|field|, 'String ], [ '|comparison|, 'String ], [ '|value|, 'String ] ] needed groceries need = true == EOD == == DBNAME == _views [ [ '|viewName|, 'String ], [ '|soup|, 'String ] ] groceries groceries groceries 2 groceries == EOD == == DBNAME == _columns [ [ '|view|, 'String ], [ '|column|, 'Int ], [ '|soup|, 'String ], [ '|field|, 'String ], [ '|width|, 'Int ], [ '|summary|, 'String ] ] groceries 1 groceries need 31 groceries 2 groceries item 0 groceries 3 groceries aisle 31 groceries 4 groceries type 68 groceries 2 1 groceries need 28 groceries 2 2 groceries item groceries 2 3 groceries aisle 28 groceries 2 4 groceries type groceries 2 5 groceries cost 37 total == EOD == == 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 ] ] gro-types item string true groceries item 0 0 0 gro-types type string 0 0 0 == EOD == == DBNAME == gro-types [ [ '|item|, 'String ], [ '|type|, 'String ] ] aluminum foil wide aluminum foil narrow apples Granny Smith apples red delicious apples golden delicious batteries AAA batteries AA batteries 9 volt batteries AAA rechargeable black eye peas jalape\u00f1\uo butter salted butter unsalted cereal corn flakes cereal raisin bran crab imitation crackers oyster fish grouper fish snapper fish catfish fish roughy fruit peaches fruit pears ice cream vanilla ice cream chocolate lettuce green leaf light bulbs 40 watt light bulbs 100 watt light bulbs three way light bulbs fluorescent milk skim milk 2% mustard dijon nuts cashews nuts almonds nuts peanuts sodas cola sodas orange == EOD == == EOD ==