| 1 |
table_create Users TABLE_PAT_KEY ShortText |
| 2 |
column_create Users hobby COLUMN_SCALAR ShortText |
| 3 |
|
| 4 |
table_create Files TABLE_PAT_KEY ShortText |
| 5 |
column_create Files owner COLUMN_SCALAR Users |
| 6 |
|
| 7 |
column_create Users files_owner_index COLUMN_INDEX Files owner |
| 8 |
|
| 9 |
table_create Hobbies TABLE_PAT_KEY ShortText |
| 10 |
column_create Hobbies users_hobby COLUMN_INDEX Users hobby |
| 11 |
|
| 12 |
load --table Users |
| 13 |
[ |
| 14 |
{"_key": "Alice", "hobby": "programming"}, |
| 15 |
{"_key": "Bob", "hobby": "system administration"}, |
| 16 |
{"_key": "Carlos", "hobby": "running"} |
| 17 |
] |
| 18 |
|
| 19 |
load --table Files |
| 20 |
[ |
| 21 |
{"_key": "/home/alice/.zshrc", "owner": "Alice"}, |
| 22 |
{"_key": "/home/bob/.bashrc", "owner": "Bob"}, |
| 23 |
{"_key": "/home/calros/public_html/index.html", "owner": "Carlos"} |
| 24 |
] |
| 25 |
|
| 26 |
select Files \ |
| 27 |
--filter '_key @^ "/home/" && owner.hobby @ "programming"' \ |
| 28 |
--output_columns '_key, owner, owner.hobby' |