Debian Codegraph @

test/command/suite/select/function/in_values/with_index/reference/and_optimized.test

raw
1 #$GRN_EXPR_OPTIMIZE=yes
2 #@on-error omit
3 plugin_register ruby/eval
4 #@on-error default
5
6 table_create Tags TABLE_PAT_KEY ShortText
7
8 table_create Memos TABLE_HASH_KEY ShortText
9 column_create Memos tag COLUMN_SCALAR Tags
10
11 column_create Tags memos_tag COLUMN_INDEX Memos tag
12
13 load --table Memos
14 [
15 {"_key": "Groonga is fast", "tag": "groonga"},
16 {"_key": "Mroonga is fast", "tag": "mroonga"},
17 {"_key": "Rroonga is fast", "tag": "rroonga"},
18 {"_key": "Droonga is fast", "tag": "droonga"},
19 {"_key": "Groonga is a HTTP server", "tag": "groonga"}
20 ]
21
22 #@collect-query-log true
23 select Memos \
24 --output_columns _key,tag \
25 --filter 'all_records() && (tag == "groonga" || tag == "mroonga" || tag == "droonga")' \
26 --sortby _id
27 #@collect-query-log false