fluent-plugin-droonga 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +7 -0
- data/benchmark/watch/benchmark-notify.rb +6 -6
- data/benchmark/watch/benchmark-notify.sh +3 -2
- data/bin/grn2jsons +0 -3
- data/doc/text/news.md +13 -0
- data/fluent-plugin-droonga.gemspec +1 -1
- data/lib/droonga/catalog/base.rb +8 -3
- data/lib/droonga/catalog.rb +1 -16
- data/lib/droonga/catalog_observer.rb +57 -0
- data/lib/droonga/collector.rb +1 -1
- data/lib/droonga/dispatcher.rb +3 -1
- data/lib/droonga/distributor_plugin.rb +47 -19
- data/lib/droonga/handler_messenger.rb +26 -2
- data/lib/droonga/message_processing_error.rb +6 -8
- data/lib/droonga/output_message.rb +17 -1
- data/lib/droonga/plugin/collector/basic.rb +44 -81
- data/lib/droonga/plugin/collector/groonga.rb +83 -0
- data/lib/droonga/plugin/collector/search.rb +104 -0
- data/lib/droonga/plugin/distributor/crud.rb +41 -0
- data/lib/droonga/plugin/distributor/distributed_search_planner.rb +4 -4
- data/lib/droonga/plugin/distributor/groonga.rb +38 -0
- data/lib/droonga/plugin/handler/add.rb +4 -1
- data/lib/droonga/plugin/handler/groonga/column_create.rb +7 -0
- data/lib/droonga/plugin/handler/groonga/table_remove.rb +42 -0
- data/lib/droonga/plugin/handler/groonga.rb +17 -2
- data/lib/droonga/plugin/handler/watch.rb +4 -4
- data/lib/droonga/plugin/input_adapter/crud.rb +27 -0
- data/lib/droonga/plugin/input_adapter/groonga.rb +16 -1
- data/lib/droonga/plugin/output_adapter/crud.rb +51 -0
- data/lib/droonga/plugin/output_adapter/groonga.rb +8 -1
- data/lib/droonga/plugin.rb +1 -1
- data/lib/droonga/replier.rb +7 -1
- data/lib/droonga/searcher.rb +168 -74
- data/lib/droonga/session.rb +1 -1
- data/lib/groonga_command_converter.rb +7 -1
- data/test/command/config/default/catalog.json +1 -1
- data/test/command/suite/add/error/invalid-integer.expected +31 -1
- data/test/command/suite/add/error/invalid-time.expected +31 -1
- data/test/command/suite/add/error/missing-key.expected +17 -1
- data/test/command/suite/add/error/missing-table.expected +17 -1
- data/test/command/suite/add/error/unknown-column.expected +31 -1
- data/test/command/suite/add/error/unknown-table.expected +17 -1
- data/test/command/suite/add/minimum.expected +1 -1
- data/test/command/suite/add/with-values.expected +1 -1
- data/test/command/suite/add/without-key.expected +1 -1
- data/test/command/suite/groonga/column_create/scalar.expected +2 -2
- data/test/command/suite/groonga/column_create/unknown-table.expected +18 -0
- data/test/command/suite/groonga/column_create/unknown-table.test +7 -0
- data/test/command/suite/groonga/column_create/vector.expected +2 -2
- data/test/command/suite/groonga/select/minimum.expected +1 -1
- data/test/command/suite/groonga/table_create/array.expected +1 -1
- data/test/command/suite/groonga/table_create/hash.expected +1 -1
- data/test/command/suite/groonga/table_remove/success.expected +17 -0
- data/test/command/suite/groonga/table_remove/success.test +8 -0
- data/test/command/suite/groonga/table_remove/unknown-table.expected +18 -0
- data/test/command/suite/groonga/table_remove/unknown-table.test +7 -0
- data/test/command/suite/message/error/missing-dataset.expected +1 -1
- data/test/command/suite/message/error/unknown-command.expected +1 -1
- data/test/command/suite/message/error/unknown-dataset.expected +1 -1
- data/test/command/suite/search/attributes/array.expected +1 -1
- data/test/command/suite/search/attributes/hash.expected +1 -1
- data/test/command/suite/search/complex.expected +1 -1
- data/test/command/suite/search/condition/nested.expected +1 -1
- data/test/command/suite/search/condition/query.expected +1 -1
- data/test/command/suite/search/condition/script.expected +1 -1
- data/test/command/suite/search/error/cyclic-source.expected +1 -1
- data/test/command/suite/search/error/deeply-cyclic-source.expected +1 -1
- data/test/command/suite/search/error/missing-source-parameter.expected +1 -1
- data/test/command/suite/search/error/unknown-source.expected +1 -1
- data/test/command/suite/search/group/count.expected +1 -1
- data/test/command/suite/search/group/limit.expected +1 -1
- data/test/command/suite/search/group/string.expected +1 -1
- data/test/command/suite/search/multiple/chained.expected +1 -1
- data/test/command/suite/search/multiple/parallel.expected +1 -1
- data/test/command/suite/search/range/only-output.expected +1 -1
- data/test/command/suite/search/range/only-sort.expected +1 -1
- data/test/command/suite/search/range/sort-and-output.expected +1 -1
- data/test/command/suite/search/range/too-large-output-offset.expected +1 -1
- data/test/command/suite/search/range/too-large-sort-offset.expected +1 -1
- data/test/command/suite/search/response/records/value/time.expected +1 -1
- data/test/command/suite/search/simple.expected +1 -1
- data/test/command/suite/search/sort/default-offset-limit.expected +1 -1
- data/test/command/suite/search/sort/invisible-column.expected +1 -1
- data/test/command/suite/watch/subscribe.expected +1 -1
- data/test/command/suite/watch/unsubscribe.expected +1 -1
- data/test/performance/run-test.rb +56 -0
- data/{benchmark → test/performance}/watch/catalog.json +0 -0
- data/test/performance/watch/feed.json +9 -0
- data/{benchmark → test/performance}/watch/fluentd.conf +0 -0
- data/test/performance/watch/subscribe.json +3 -0
- data/test/unit/catalog/test_version1.rb +34 -0
- data/test/unit/plugin/collector/test_basic.rb +300 -479
- data/test/unit/plugin/collector/test_search.rb +814 -0
- data/test/unit/plugin/distributor/test_search.rb +4 -4
- data/test/unit/plugin/distributor/test_search_planner.rb +260 -260
- data/test/unit/plugin/handler/groonga/test_column_create.rb +15 -1
- data/test/unit/plugin/handler/groonga/test_table_create.rb +6 -2
- data/test/unit/plugin/handler/groonga/test_table_remove.rb +58 -0
- data/test/unit/plugin/handler/test_add.rb +3 -1
- data/test/unit/plugin/handler/test_groonga.rb +24 -0
- data/test/unit/plugin/handler/test_search.rb +294 -0
- data/test/unit/plugin/handler/test_watch.rb +1 -1
- data/test/unit/plugin/{adapter → input_adapter}/groonga/test_select.rb +5 -37
- data/test/unit/plugin/output_adapter/groonga/test_select.rb +55 -0
- metadata +38 -6
data/lib/droonga/searcher.rb
CHANGED
@@ -190,7 +190,7 @@ module Droonga
|
|
190
190
|
"||" => Groonga::Operator::OR,
|
191
191
|
"&&" => Groonga::Operator::AND,
|
192
192
|
"-" => Groonga::Operator::AND_NOT,
|
193
|
-
}
|
193
|
+
}
|
194
194
|
|
195
195
|
class << self
|
196
196
|
def search(search_request)
|
@@ -361,6 +361,143 @@ module Droonga
|
|
361
361
|
end
|
362
362
|
end
|
363
363
|
|
364
|
+
module AttributeFormattable
|
365
|
+
def format_attribute(attribute, table)
|
366
|
+
label = attribute[:label]
|
367
|
+
source = attribute[:source]
|
368
|
+
if source == "_subrecs"
|
369
|
+
sub_record_table = table.range
|
370
|
+
sub_attributes = format_attributes(attribute[:attributes], sub_record_table)
|
371
|
+
|
372
|
+
format_attribute_subrecs(label, sub_attributes)
|
373
|
+
else
|
374
|
+
expression = attribute[:expression]
|
375
|
+
if expression
|
376
|
+
format_attribute_expression(label, expression)
|
377
|
+
else
|
378
|
+
column = table.column(source)
|
379
|
+
format_attribute_column(label, column)
|
380
|
+
end
|
381
|
+
end
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
385
|
+
class SimpleAttributesFormatter
|
386
|
+
include AttributeFormattable
|
387
|
+
|
388
|
+
def format_attribute_subrecs(label, sub_attributes)
|
389
|
+
{
|
390
|
+
"name" => label,
|
391
|
+
"attributes" => sub_attributes,
|
392
|
+
}
|
393
|
+
end
|
394
|
+
|
395
|
+
def format_attribute_column(label, column)
|
396
|
+
vector = column.respond_to?(:vector?) ? column.vector? : false
|
397
|
+
{"name" => label, "type" => column.range.name, "vector" => vector}
|
398
|
+
end
|
399
|
+
|
400
|
+
def format_attribute_expression(label, expression)
|
401
|
+
{"name" => label} # TODO include detailed information of expression
|
402
|
+
end
|
403
|
+
|
404
|
+
def format_attributes(attributes, table)
|
405
|
+
attributes.collect do |attribute|
|
406
|
+
format_attribute(attribute, table)
|
407
|
+
end
|
408
|
+
end
|
409
|
+
end
|
410
|
+
|
411
|
+
class ComplexAttributesFormatter
|
412
|
+
include AttributeFormattable
|
413
|
+
|
414
|
+
def format_attribute_subrecs(label, sub_attributes)
|
415
|
+
{
|
416
|
+
"attributes" => sub_attributes
|
417
|
+
}
|
418
|
+
end
|
419
|
+
|
420
|
+
def format_attribute_column(label, column)
|
421
|
+
vector = column.respond_to?(:vector?) ? column.vector? : false
|
422
|
+
{"type" => column.range.name, "vector" => vector}
|
423
|
+
end
|
424
|
+
|
425
|
+
def format_attribute_expression(label, expression)
|
426
|
+
{} # TODO include detailed information of expression
|
427
|
+
end
|
428
|
+
|
429
|
+
def format_attributes(attributes, table)
|
430
|
+
formatted_attributes = {}
|
431
|
+
attributes.each do |attribute|
|
432
|
+
formatted_attribute = format_attribute(attribute, table)
|
433
|
+
attribute_name = attribute[:label]
|
434
|
+
formatted_attributes[attribute_name] = formatted_attribute
|
435
|
+
end
|
436
|
+
formatted_attributes
|
437
|
+
end
|
438
|
+
end
|
439
|
+
|
440
|
+
module RecordsFormattable
|
441
|
+
def record_value(record, attribute)
|
442
|
+
if attribute[:source] == "_subrecs"
|
443
|
+
record.sub_records.collect do |sub_record|
|
444
|
+
sub_attributes = attribute[:attributes]
|
445
|
+
format_record(sub_attributes, sub_record)
|
446
|
+
end
|
447
|
+
else
|
448
|
+
expression = attribute[:expression]
|
449
|
+
if expression
|
450
|
+
variable = attribute[:variable]
|
451
|
+
variable.value = record
|
452
|
+
expression.execute
|
453
|
+
else
|
454
|
+
value = record[attribute[:source]]
|
455
|
+
if value.is_a?(Groonga::Record)
|
456
|
+
value.record_id
|
457
|
+
else
|
458
|
+
value
|
459
|
+
end
|
460
|
+
end
|
461
|
+
end
|
462
|
+
end
|
463
|
+
|
464
|
+
def format_records(output_target_attributes, records, output_limit, output_offset)
|
465
|
+
cursor_options = {
|
466
|
+
:offset => output_offset,
|
467
|
+
:limit => output_limit
|
468
|
+
}
|
469
|
+
formatted_records = nil
|
470
|
+
records.open_cursor(cursor_options) do |cursor|
|
471
|
+
formatted_records = cursor.collect do |record|
|
472
|
+
format_record(output_target_attributes, record)
|
473
|
+
end
|
474
|
+
end
|
475
|
+
formatted_records
|
476
|
+
end
|
477
|
+
end
|
478
|
+
|
479
|
+
class SimpleRecordsFormatter
|
480
|
+
include RecordsFormattable
|
481
|
+
|
482
|
+
def format_record(attributes, record)
|
483
|
+
attributes.collect do |attribute|
|
484
|
+
record_value(record, attribute)
|
485
|
+
end
|
486
|
+
end
|
487
|
+
end
|
488
|
+
|
489
|
+
class ComplexRecordsFormatter
|
490
|
+
include RecordsFormattable
|
491
|
+
|
492
|
+
def format_record(attributes, record)
|
493
|
+
values = {}
|
494
|
+
attributes.each do |attribute|
|
495
|
+
values[attribute[:label]] = record_value(record, attribute)
|
496
|
+
end
|
497
|
+
values
|
498
|
+
end
|
499
|
+
end
|
500
|
+
|
364
501
|
class ResultFormatter
|
365
502
|
class << self
|
366
503
|
def format(search_request, search_result)
|
@@ -407,91 +544,44 @@ module Droonga
|
|
407
544
|
@request.output["elements"] || []
|
408
545
|
end
|
409
546
|
|
547
|
+
def output_offset
|
548
|
+
@request.output["offset"] || 0
|
549
|
+
end
|
550
|
+
|
551
|
+
def output_limit
|
552
|
+
@request.output["limit"] || 10
|
553
|
+
end
|
554
|
+
|
410
555
|
def format_count
|
411
556
|
@result.count
|
412
557
|
end
|
413
558
|
|
414
559
|
def format_attributes
|
415
|
-
|
416
|
-
attributes = nil
|
560
|
+
attributes_formatter = nil
|
417
561
|
if @request.complex_output?
|
418
|
-
|
419
|
-
# {"_id" => {"type" => "UInt32", "vector" => false}}
|
420
|
-
attributes = {}
|
562
|
+
attributes_formatter = ComplexAttributesFormatter.new
|
421
563
|
else
|
422
|
-
|
423
|
-
# [{"name" => "_id", "type" => "UInt32", "vector" => false}]
|
424
|
-
attributes = []
|
425
|
-
end
|
426
|
-
|
427
|
-
attributes
|
428
|
-
end
|
429
|
-
|
430
|
-
def format_records
|
431
|
-
params = @request.output
|
432
|
-
|
433
|
-
attributes = params["attributes"]
|
434
|
-
target_attributes = normalize_target_attributes(attributes)
|
435
|
-
offset = params["offset"] || 0
|
436
|
-
limit = params["limit"] || 10
|
437
|
-
formatted_records = nil
|
438
|
-
@result.records.open_cursor(:offset => offset, :limit => limit) do |cursor|
|
439
|
-
if @request.complex_output?
|
440
|
-
formatted_records = cursor.collect do |record|
|
441
|
-
complex_record(target_attributes, record)
|
442
|
-
end
|
443
|
-
else
|
444
|
-
formatted_records = cursor.collect do |record|
|
445
|
-
simple_record(target_attributes, record)
|
446
|
-
end
|
447
|
-
end
|
448
|
-
end
|
449
|
-
|
450
|
-
formatted_records
|
451
|
-
end
|
452
|
-
|
453
|
-
def complex_record(attributes, record)
|
454
|
-
values = {}
|
455
|
-
attributes.collect do |attribute|
|
456
|
-
values[attribute[:label]] = record_value(record, attribute)
|
564
|
+
attributes_formatter = SimpleAttributesFormatter.new
|
457
565
|
end
|
458
|
-
|
566
|
+
attributes_formatter.format_attributes(
|
567
|
+
output_target_attributes,
|
568
|
+
@result.records
|
569
|
+
)
|
459
570
|
end
|
460
571
|
|
461
|
-
def
|
462
|
-
attributes
|
463
|
-
|
464
|
-
end
|
572
|
+
def output_target_attributes
|
573
|
+
attributes = @request.output["attributes"]
|
574
|
+
normalize_target_attributes(attributes)
|
465
575
|
end
|
466
576
|
|
467
|
-
def
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
target_attributes = resolve_attributes(attribute, sub_record)
|
472
|
-
complex_record(target_attributes, sub_record)
|
473
|
-
end
|
474
|
-
else
|
475
|
-
record.sub_records.collect do |sub_record|
|
476
|
-
target_attributes = resolve_attributes(attribute, sub_record)
|
477
|
-
simple_record(target_attributes, sub_record)
|
478
|
-
end
|
479
|
-
end
|
577
|
+
def format_records
|
578
|
+
records_formatter = nil
|
579
|
+
if @request.complex_output?
|
580
|
+
records_formatter = ComplexRecordsFormatter.new
|
480
581
|
else
|
481
|
-
|
482
|
-
if expression
|
483
|
-
variable = attribute[:variable]
|
484
|
-
variable.value = record
|
485
|
-
expression.execute
|
486
|
-
else
|
487
|
-
value = record[attribute[:source]]
|
488
|
-
if value.is_a?(Groonga::Record)
|
489
|
-
value.record_id
|
490
|
-
else
|
491
|
-
value
|
492
|
-
end
|
493
|
-
end
|
582
|
+
records_formatter = SimpleRecordsFormatter.new
|
494
583
|
end
|
584
|
+
records_formatter.format_records(output_target_attributes, @result.records, output_limit, output_offset)
|
495
585
|
end
|
496
586
|
|
497
587
|
def resolve_attributes(attribute, record)
|
@@ -522,13 +612,17 @@ module Droonga
|
|
522
612
|
condition.value = @result.condition
|
523
613
|
source = nil
|
524
614
|
end
|
525
|
-
{
|
615
|
+
normalized_attributes = {
|
526
616
|
label: attribute["label"] || attribute["source"],
|
527
617
|
source: source,
|
528
618
|
expression: expression,
|
529
619
|
variable: variable,
|
530
|
-
attributes: attribute["attributes"]
|
531
620
|
}
|
621
|
+
if attribute["attributes"]
|
622
|
+
normalized_attributes[:attributes] =
|
623
|
+
normalize_target_attributes(attribute["attributes"], domain.range)
|
624
|
+
end
|
625
|
+
normalized_attributes
|
532
626
|
end
|
533
627
|
end
|
534
628
|
|
data/lib/droonga/session.rb
CHANGED
@@ -21,7 +21,7 @@ require "time"
|
|
21
21
|
|
22
22
|
module Droonga
|
23
23
|
class GroongaCommandConverter
|
24
|
-
STATUS_OK = 200
|
24
|
+
STATUS_OK = 200
|
25
25
|
|
26
26
|
def initialize(options={})
|
27
27
|
@options = options
|
@@ -35,6 +35,8 @@ module Droonga
|
|
35
35
|
case command.name
|
36
36
|
when "table_create"
|
37
37
|
yield create_table_create_command(command)
|
38
|
+
when "table_remove"
|
39
|
+
yield create_table_remove_command(command)
|
38
40
|
when "column_create"
|
39
41
|
yield create_column_create_command(command)
|
40
42
|
when "select"
|
@@ -102,6 +104,10 @@ module Droonga
|
|
102
104
|
create_message("table_create", command.arguments)
|
103
105
|
end
|
104
106
|
|
107
|
+
def create_table_remove_command(command)
|
108
|
+
create_message("table_remove", command.arguments)
|
109
|
+
end
|
110
|
+
|
105
111
|
def create_column_create_command(command)
|
106
112
|
create_message("column_create", command.arguments)
|
107
113
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"droonga.message",
|
3
3
|
0,
|
4
4
|
{
|
5
|
-
"inReplyTo":
|
5
|
+
"inReplyTo": "request-id",
|
6
6
|
"statusCode": 400,
|
7
7
|
"type": "add.result",
|
8
8
|
"body": {
|
@@ -15,6 +15,36 @@
|
|
15
15
|
"age": "secret"
|
16
16
|
}
|
17
17
|
}
|
18
|
+
},
|
19
|
+
"errors": {
|
20
|
+
"sources0": {
|
21
|
+
"statusCode": 400,
|
22
|
+
"body": {
|
23
|
+
"name": "InvalidValue",
|
24
|
+
"message": "The column \"age\" cannot store the value \"secret\".",
|
25
|
+
"detail": {
|
26
|
+
"table": "User",
|
27
|
+
"key": "key",
|
28
|
+
"values": {
|
29
|
+
"age": "secret"
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"sources1": {
|
35
|
+
"statusCode": 400,
|
36
|
+
"body": {
|
37
|
+
"name": "InvalidValue",
|
38
|
+
"message": "The column \"age\" cannot store the value \"secret\".",
|
39
|
+
"detail": {
|
40
|
+
"table": "User",
|
41
|
+
"key": "key",
|
42
|
+
"values": {
|
43
|
+
"age": "secret"
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
18
48
|
}
|
19
49
|
}
|
20
50
|
]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"droonga.message",
|
3
3
|
0,
|
4
4
|
{
|
5
|
-
"inReplyTo":
|
5
|
+
"inReplyTo": "request-id",
|
6
6
|
"statusCode": 400,
|
7
7
|
"type": "add.result",
|
8
8
|
"body": {
|
@@ -15,6 +15,36 @@
|
|
15
15
|
"birthday": "today"
|
16
16
|
}
|
17
17
|
}
|
18
|
+
},
|
19
|
+
"errors": {
|
20
|
+
"sources0": {
|
21
|
+
"statusCode": 400,
|
22
|
+
"body": {
|
23
|
+
"name": "InvalidValue",
|
24
|
+
"message": "The column \"birthday\" cannot store the value \"today\".",
|
25
|
+
"detail": {
|
26
|
+
"table": "User",
|
27
|
+
"key": "key",
|
28
|
+
"values": {
|
29
|
+
"birthday": "today"
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"sources1": {
|
35
|
+
"statusCode": 400,
|
36
|
+
"body": {
|
37
|
+
"name": "InvalidValue",
|
38
|
+
"message": "The column \"birthday\" cannot store the value \"today\".",
|
39
|
+
"detail": {
|
40
|
+
"table": "User",
|
41
|
+
"key": "key",
|
42
|
+
"values": {
|
43
|
+
"birthday": "today"
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
18
48
|
}
|
19
49
|
}
|
20
50
|
]
|
@@ -2,12 +2,28 @@
|
|
2
2
|
"droonga.message",
|
3
3
|
0,
|
4
4
|
{
|
5
|
-
"inReplyTo":
|
5
|
+
"inReplyTo": "request-id",
|
6
6
|
"statusCode": 400,
|
7
7
|
"type": "add.result",
|
8
8
|
"body": {
|
9
9
|
"name": "MissingPrimaryKeyParameter",
|
10
10
|
"message": "\"key\" must be specified. The table \"User\" requires a primary key for a new record."
|
11
|
+
},
|
12
|
+
"errors": {
|
13
|
+
"sources0": {
|
14
|
+
"statusCode": 400,
|
15
|
+
"body": {
|
16
|
+
"name": "MissingPrimaryKeyParameter",
|
17
|
+
"message": "\"key\" must be specified. The table \"User\" requires a primary key for a new record."
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"sources1": {
|
21
|
+
"statusCode": 400,
|
22
|
+
"body": {
|
23
|
+
"name": "MissingPrimaryKeyParameter",
|
24
|
+
"message": "\"key\" must be specified. The table \"User\" requires a primary key for a new record."
|
25
|
+
}
|
26
|
+
}
|
11
27
|
}
|
12
28
|
}
|
13
29
|
]
|
@@ -2,12 +2,28 @@
|
|
2
2
|
"droonga.message",
|
3
3
|
0,
|
4
4
|
{
|
5
|
-
"inReplyTo":
|
5
|
+
"inReplyTo": "request-id",
|
6
6
|
"statusCode": 400,
|
7
7
|
"type": "add.result",
|
8
8
|
"body": {
|
9
9
|
"name": "MissingTableParameter",
|
10
10
|
"message": "\"table\" must be specified."
|
11
|
+
},
|
12
|
+
"errors": {
|
13
|
+
"sources0": {
|
14
|
+
"statusCode": 400,
|
15
|
+
"body": {
|
16
|
+
"name": "MissingTableParameter",
|
17
|
+
"message": "\"table\" must be specified."
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"sources1": {
|
21
|
+
"statusCode": 400,
|
22
|
+
"body": {
|
23
|
+
"name": "MissingTableParameter",
|
24
|
+
"message": "\"table\" must be specified."
|
25
|
+
}
|
26
|
+
}
|
11
27
|
}
|
12
28
|
}
|
13
29
|
]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"droonga.message",
|
3
3
|
0,
|
4
4
|
{
|
5
|
-
"inReplyTo":
|
5
|
+
"inReplyTo": "request-id",
|
6
6
|
"statusCode": 404,
|
7
7
|
"type": "add.result",
|
8
8
|
"body": {
|
@@ -15,6 +15,36 @@
|
|
15
15
|
"unknown": "unknown"
|
16
16
|
}
|
17
17
|
}
|
18
|
+
},
|
19
|
+
"errors": {
|
20
|
+
"sources0": {
|
21
|
+
"statusCode": 404,
|
22
|
+
"body": {
|
23
|
+
"name": "UnknownColumn",
|
24
|
+
"message": "The column \"unknown\" does not exist in the table \"User\".",
|
25
|
+
"detail": {
|
26
|
+
"table": "User",
|
27
|
+
"key": "key",
|
28
|
+
"values": {
|
29
|
+
"unknown": "unknown"
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"sources1": {
|
35
|
+
"statusCode": 404,
|
36
|
+
"body": {
|
37
|
+
"name": "UnknownColumn",
|
38
|
+
"message": "The column \"unknown\" does not exist in the table \"User\".",
|
39
|
+
"detail": {
|
40
|
+
"table": "User",
|
41
|
+
"key": "key",
|
42
|
+
"values": {
|
43
|
+
"unknown": "unknown"
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
18
48
|
}
|
19
49
|
}
|
20
50
|
]
|
@@ -2,12 +2,28 @@
|
|
2
2
|
"droonga.message",
|
3
3
|
0,
|
4
4
|
{
|
5
|
-
"inReplyTo":
|
5
|
+
"inReplyTo": "request-id",
|
6
6
|
"statusCode": 404,
|
7
7
|
"type": "add.result",
|
8
8
|
"body": {
|
9
9
|
"name": "UnknownTable",
|
10
10
|
"message": "The table \"Unknown\" does not exist in the dataset."
|
11
|
+
},
|
12
|
+
"errors": {
|
13
|
+
"sources0": {
|
14
|
+
"statusCode": 404,
|
15
|
+
"body": {
|
16
|
+
"name": "UnknownTable",
|
17
|
+
"message": "The table \"Unknown\" does not exist in the dataset."
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"sources1": {
|
21
|
+
"statusCode": 404,
|
22
|
+
"body": {
|
23
|
+
"name": "UnknownTable",
|
24
|
+
"message": "The table \"Unknown\" does not exist in the dataset."
|
25
|
+
}
|
26
|
+
}
|
11
27
|
}
|
12
28
|
}
|
13
29
|
]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"droonga.message",
|
3
3
|
0,
|
4
4
|
{
|
5
|
-
"inReplyTo":
|
5
|
+
"inReplyTo": "request-id",
|
6
6
|
"statusCode": 200,
|
7
7
|
"type": "table_create.result",
|
8
8
|
"body": [
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"droonga.message",
|
20
20
|
0,
|
21
21
|
{
|
22
|
-
"inReplyTo":
|
22
|
+
"inReplyTo": "request-id",
|
23
23
|
"statusCode": 200,
|
24
24
|
"type": "column_create.result",
|
25
25
|
"body": [
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"droonga.message",
|
3
3
|
0,
|
4
4
|
{
|
5
|
-
"inReplyTo":
|
5
|
+
"inReplyTo": "request-id",
|
6
6
|
"statusCode": 200,
|
7
7
|
"type": "table_create.result",
|
8
8
|
"body": [
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"droonga.message",
|
20
20
|
0,
|
21
21
|
{
|
22
|
-
"inReplyTo":
|
22
|
+
"inReplyTo": "request-id",
|
23
23
|
"statusCode": 200,
|
24
24
|
"type": "column_create.result",
|
25
25
|
"body": [
|