Debian Codegraph @

test/command/suite/select/index/nested/by_column/range/hash.test

raw
1 table_create Users TABLE_HASH_KEY ShortText
2 column_create Users birthday COLUMN_SCALAR Time
3
4 table_create Files TABLE_HASH_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 Birthdays TABLE_PAT_KEY Time
10 column_create Birthdays users_birthday COLUMN_INDEX Users birthday
11
12 load --table Users
13 [
14 {"_key": "Alice", "birthday": "1992-02-09 00:00:00"},
15 {"_key": "Bob", "birthday": "1988-01-04 00:00:00"},
16 {"_key": "Carlos", "birthday": "1982-12-29 00:00:00"}
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 'owner.birthday <= "1988-01-04 00:00:00"' \
28 --output_columns '_key, owner, owner.birthday'