Skip to content

Commit

Permalink
test: add query test case without cache
Browse files Browse the repository at this point in the history
Confirm whether query parameter is changed, Groonga returns result
without using cache.
  • Loading branch information
kenhys committed Apr 14, 2017
1 parent eb8f465 commit 24bcd62
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
78 changes: 78 additions & 0 deletions test/command/suite/select/cache/query.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
table_create Memos TABLE_HASH_KEY ShortText
[[0,0.0,0.0],true]
column_create Memos tag COLUMN_SCALAR ShortText
[[0,0.0,0.0],true]
load --table Memos
[
{"_key": "Hello Groonga!", "tag": "Groonga"},
{"_key": "Hello Rroonga!", "tag": "Rroonga"}
]
[[0,0.0,0.0],2]
select Memos --match_columns tag --query Groonga
[
[
0,
0.0,
0.0
],
[
[
[
1
],
[
[
"_id",
"UInt32"
],
[
"_key",
"ShortText"
],
[
"tag",
"ShortText"
]
],
[
1,
"Hello Groonga!",
"Groonga"
]
]
]
]
select Memos --match_columns tag --query Rroonga
[
[
0,
0.0,
0.0
],
[
[
[
1
],
[
[
"_id",
"UInt32"
],
[
"_key",
"ShortText"
],
[
"tag",
"ShortText"
]
],
[
2,
"Hello Rroonga!",
"Rroonga"
]
]
]
]
17 changes: 17 additions & 0 deletions test/command/suite/select/cache/query.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
table_create Memos TABLE_HASH_KEY ShortText
column_create Memos tag COLUMN_SCALAR ShortText

load --table Memos
[
{"_key": "Hello Groonga!", "tag": "Groonga"},
{"_key": "Hello Rroonga!", "tag": "Rroonga"}
]

select Memos \
--match_columns tag \
--query Groonga

select Memos \
--match_columns tag \
--query Rroonga

0 comments on commit 24bcd62

Please sign in to comment.