groonga-client 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/groonga-client +4 -4
- data/bin/groonga-client-index-recreate +23 -0
- data/doc/text/news.md +26 -0
- data/lib/groonga/client/command-line/groonga-client-index-recreate.rb +325 -0
- data/lib/groonga/client/command-line/groonga-client.rb +244 -0
- data/lib/groonga/client/response/column-list.rb +32 -3
- data/lib/groonga/client/response/schema.rb +28 -2
- data/lib/groonga/client/version.rb +1 -1
- data/test/command-line/test-index-recreate.rb +369 -0
- data/test/response/test-column-list.rb +134 -8
- data/test/response/test-schema.rb +189 -2
- metadata +9 -6
- data/lib/groonga/client/cli.rb +0 -233
- data/test/results/test-column-list.rb +0 -64
@@ -1,64 +0,0 @@
|
|
1
|
-
require "test/unit/rr"
|
2
|
-
|
3
|
-
class TestResultsColumnList < Test::Unit::TestCase
|
4
|
-
class TestResults < self
|
5
|
-
def setup
|
6
|
-
command = nil
|
7
|
-
header = [0,1372430096.70991,0.000522851943969727]
|
8
|
-
body = [[["id","UInt32"],["name","ShortText"],["path","ShortText"],["type","ShortText"],["flags","ShortText"],["domain","ShortText"],["range","ShortText"],["source","ShortText"]],
|
9
|
-
[259,"_key","","","COLUMN_SCALAR","Bigram","ShortText",[]],
|
10
|
-
[278,"comment_index","/tmp/db.db.0000116","index","COLUMN_INDEX|WITH_POSITION|PERSISTENT","Bigram","Comments",["Comments.comment"]],
|
11
|
-
[277,"users_index","/tmp/db.db.0000115","index","COLUMN_INDEX|WITH_SECTION|WITH_POSITION|PERSISTENT","Bigram","Users",["Users.name","Users.location_str","Users.description"]]]
|
12
|
-
@column_list = Groonga::Client::Response::ColumnList.new(command, header, body)
|
13
|
-
end
|
14
|
-
|
15
|
-
def test_column_list
|
16
|
-
assert_equal(
|
17
|
-
[
|
18
|
-
{
|
19
|
-
:id => 259,
|
20
|
-
:name => "_key",
|
21
|
-
:path => "",
|
22
|
-
:type => "",
|
23
|
-
:flags => "COLUMN_SCALAR",
|
24
|
-
:domain => "Bigram",
|
25
|
-
:range => "ShortText",
|
26
|
-
:source => [],
|
27
|
-
},
|
28
|
-
{
|
29
|
-
:id => 278,
|
30
|
-
:name => "comment_index",
|
31
|
-
:path => "/tmp/db.db.0000116",
|
32
|
-
:type => "index",
|
33
|
-
:flags => "COLUMN_INDEX|WITH_POSITION|PERSISTENT",
|
34
|
-
:domain => "Bigram",
|
35
|
-
:range => "Comments",
|
36
|
-
:source => ["Comments.comment"],
|
37
|
-
},
|
38
|
-
{
|
39
|
-
:id => 277,
|
40
|
-
:name => "users_index",
|
41
|
-
:path => "/tmp/db.db.0000115",
|
42
|
-
:type => "index",
|
43
|
-
:flags => "COLUMN_INDEX|WITH_SECTION|WITH_POSITION|PERSISTENT",
|
44
|
-
:domain => "Bigram",
|
45
|
-
:range => "Users",
|
46
|
-
:source => ["Users.name","Users.location_str", "Users.description"],
|
47
|
-
},
|
48
|
-
],
|
49
|
-
@column_list.collect {|column|
|
50
|
-
{
|
51
|
-
:id => column.id,
|
52
|
-
:name => column.name,
|
53
|
-
:path => column.path,
|
54
|
-
:type => column.type,
|
55
|
-
:flags => column.flags,
|
56
|
-
:domain => column.domain,
|
57
|
-
:range => column.range,
|
58
|
-
:source => column.source,
|
59
|
-
}
|
60
|
-
}
|
61
|
-
)
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|