Debian Codegraph @

test/command/suite/select/drilldowns/table/slice.test

raw
1 table_create Tags TABLE_PAT_KEY ShortText
2
3 table_create Memos TABLE_HASH_KEY ShortText
4 column_create Memos date COLUMN_SCALAR Time
5 column_create Memos tag COLUMN_SCALAR Tags
6
7 column_create Tags memos_tag COLUMN_INDEX Memos tag
8
9 load --table Memos
10 [
11 {"_key": "Groonga is fast!", "date": "2016-05-19 12:00:00", "tag": "Groonga"},
12 {"_key": "Mroonga is fast!", "date": "2016-05-19 12:00:01", "tag": "Mroonga"},
13 {"_key": "Groonga sticker!", "date": "2016-05-19 12:00:02", "tag": "Groonga"},
14 {"_key": "Groonga site!", "date": "2016-05-19 12:00:02", "tag": "Groonga"},
15 {"_key": "Rroonga is fast!", "date": "2016-05-19 12:00:03", "tag": "Rroonga"}
16 ]
17
18 select Memos \
19 --filter 'date < "2016-05-19 13:00:02"' \
20 --slices[groonga].filter 'tag @ "Groonga"' \
21 --slices[groonga].sort_keys '_id' \
22 --slices[groonga].output_columns '_key, date, tag' \
23 --drilldowns[tags].table groonga \
24 --drilldowns[tags].keys date