Debian Codegraph @

test/command/suite/select/index/nested/by_key/match.test

raw
1 table_create Paths TABLE_PAT_KEY ShortText
2
3 table_create Logs TABLE_NO_KEY
4 column_create Logs message COLUMN_SCALAR ShortText
5 column_create Logs path COLUMN_SCALAR Paths
6
7 column_create Paths logs_index COLUMN_INDEX Logs path
8
9 table_create Terms TABLE_PAT_KEY ShortText \
10 --default_tokenizer TokenBigram \
11 --normalizer NormalizerAuto
12 column_create Terms path_index COLUMN_INDEX|WITH_POSITION Paths _key
13
14 load --table Logs
15 [
16 {"message": "access", "path": "/home/alice/.zshrc"},
17 {"message": "write", "path": "/home/bob/.bashrc"},
18 {"message": "read", "path": "/home/calros/public_html/index.html"}
19 ]
20
21 select Logs \
22 --filter 'path._key @ "alice"' \
23 --output_columns '_key, path'