Navigation Menu

Skip to content

Commit

Permalink
Add tests for vector reference output
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 12, 2013
1 parent d7de6b2 commit 52cf0f8
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 0 deletions.
@@ -0,0 +1,43 @@
table_create Users TABLE_HASH_KEY ShortText
[[0,0.0,0.0],true]
table_create Bookmarks TABLE_HASH_KEY ShortText
[[0,0.0,0.0],true]
column_create Bookmarks users COLUMN_VECTOR Users
[[0,0.0,0.0],true]
load --table Bookmarks
[
{"_key": "http://groonga.org/", "users": ["mori", "s-yata"]}
]
[[0,0.0,0.0],1]
select Bookmarks --output_columns _key,users
[
[
0,
0.0,
0.0
],
[
[
[
1
],
[
[
"_key",
"ShortText"
],
[
"users",
"Users"
]
],
[
"http://groonga.org/",
[
"mori",
"s-yata"
]
]
]
]
]
@@ -0,0 +1,11 @@
table_create Users TABLE_HASH_KEY ShortText

table_create Bookmarks TABLE_HASH_KEY ShortText
column_create Bookmarks users COLUMN_VECTOR Users

load --table Bookmarks
[
{"_key": "http://groonga.org/", "users": ["mori", "s-yata"]}
]

select Bookmarks --output_columns _key,users
@@ -0,0 +1,27 @@
table_create Users TABLE_HASH_KEY ShortText
[[0,0.0,0.0],true]
table_create Bookmarks TABLE_HASH_KEY ShortText
[[0,0.0,0.0],true]
column_create Bookmarks users COLUMN_VECTOR Users
[[0,0.0,0.0],true]
load --table Bookmarks
[
{"_key": "http://groonga.org/", "users": ["mori", "s-yata"]}
]
[[0,0.0,0.0],1]
select Bookmarks --output_columns _key,users --output_type xml
<?xml version="1.0" encoding="utf-8"?>
<SEGMENTS>
<SEGMENT>
<RESULTPAGE>
<RESULTSET OFFSET="0" LIMIT="1" NHITS="1">
<HIT NO="1">
<FIELD NAME="_key">http://groonga.org/</FIELD>
<FIELD NAME="users">mori, s-yata</FIELD>
</HIT>
</RESULTSET>
</RESULTPAGE>
</SEGMENT>
</SEGMENTS>


@@ -0,0 +1,11 @@
table_create Users TABLE_HASH_KEY ShortText

table_create Bookmarks TABLE_HASH_KEY ShortText
column_create Bookmarks users COLUMN_VECTOR Users

load --table Bookmarks
[
{"_key": "http://groonga.org/", "users": ["mori", "s-yata"]}
]

select Bookmarks --output_columns _key,users --output_type xml

0 comments on commit 52cf0f8

Please sign in to comment.