| 1 |
table_create Products TABLE_PAT_KEY ShortText |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
table_create Purchases TABLE_NO_KEY |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Purchases product COLUMN_SCALAR Products |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
column_create Purchases tag COLUMN_SCALAR ShortText |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
column_create Products purchases COLUMN_INDEX Purchases product |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
load --table Products |
| 12 |
[ |
| 13 |
{"_key": "apple"}, |
| 14 |
{"_key": "banana"}, |
| 15 |
{"_key": "cacao"} |
| 16 |
] |
| 17 |
[[0,0.0,0.0],3] |
| 18 |
load --table Purchases |
| 19 |
[ |
| 20 |
{"product": "apple", "tag": "man"}, |
| 21 |
{"product": "banana", "tag": "man"}, |
| 22 |
{"product": "cacao", "tag": "woman"}, |
| 23 |
{"product": "apple", "tag": "many"} |
| 24 |
] |
| 25 |
[[0,0.0,0.0],4] |
| 26 |
select Products --output_columns _key,purchases.tag |
| 27 |
[ |
| 28 |
[ |
| 29 |
0, |
| 30 |
0.0, |
| 31 |
0.0 |
| 32 |
], |
| 33 |
[ |
| 34 |
[ |
| 35 |
[ |
| 36 |
3 |
| 37 |
], |
| 38 |
[ |
| 39 |
[ |
| 40 |
"_key", |
| 41 |
"ShortText" |
| 42 |
], |
| 43 |
[ |
| 44 |
"purchases.tag", |
| 45 |
"ShortText" |
| 46 |
] |
| 47 |
], |
| 48 |
[ |
| 49 |
"apple", |
| 50 |
[ |
| 51 |
"man", |
| 52 |
"many" |
| 53 |
] |
| 54 |
], |
| 55 |
[ |
| 56 |
"banana", |
| 57 |
[ |
| 58 |
"man" |
| 59 |
] |
| 60 |
], |
| 61 |
[ |
| 62 |
"cacao", |
| 63 |
[ |
| 64 |
"woman" |
| 65 |
] |
| 66 |
] |
| 67 |
] |
| 68 |
] |
| 69 |
] |