|
444 | 444 | doc.parsed_response['hasMore'].should eq(false)
|
445 | 445 | doc.parsed_response['result'].length.should eq(10)
|
446 | 446 | end
|
| 447 | + |
| 448 | + it "creates a query that executes a dynamic index expression during query execution" do |
| 449 | + cmd = api |
| 450 | + body = "{ \"query\" : \"FOR i IN #{@cn} FOR j IN #{@cn} FILTER i._key == j._key RETURN i._key\" }" |
| 451 | + doc = ArangoDB.log_post("#{prefix}-index-expression", cmd, :body => body) |
| 452 | + |
| 453 | + doc.code.should eq(201) |
| 454 | + doc.headers['content-type'].should eq("application/json; charset=utf-8") |
| 455 | + doc.parsed_response['error'].should eq(false) |
| 456 | + doc.parsed_response['code'].should eq(201) |
| 457 | + doc.parsed_response['id'].should be_nil |
| 458 | + doc.parsed_response['hasMore'].should eq(false) |
| 459 | + doc.parsed_response['result'].length.should eq(10) |
| 460 | + end |
| 461 | + |
| 462 | + it "creates a query that executes a dynamic V8 index expression during query execution" do |
| 463 | + cmd = api |
| 464 | + body = "{ \"query\" : \"FOR i IN #{@cn} FOR j IN #{@cn} FILTER j._key == PASSTHRU(i._key) RETURN i._key\" }" |
| 465 | + doc = ArangoDB.log_post("#{prefix}-v8-index-expression", cmd, :body => body) |
| 466 | + |
| 467 | + doc.code.should eq(201) |
| 468 | + doc.headers['content-type'].should eq("application/json; charset=utf-8") |
| 469 | + doc.parsed_response['error'].should eq(false) |
| 470 | + doc.parsed_response['code'].should eq(201) |
| 471 | + doc.parsed_response['id'].should be_nil |
| 472 | + doc.parsed_response['hasMore'].should eq(false) |
| 473 | + doc.parsed_response['result'].length.should eq(10) |
| 474 | + end |
447 | 475 | end
|
448 | 476 |
|
449 | 477 | ################################################################################
|
|
0 commit comments