8000 better export API cleanup · ezhangle/arangodb@0f1244f · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f1244f

Browse files
committed
better export API cleanup
1 parent ca6801d commit 0f1244f

15 files changed

+843
-38
lines changed

UnitTests/HttpInterface/api-cursor-spec.rb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,34 @@
444444
doc.parsed_response['hasMore'].should eq(false)
445445
doc.parsed_response['result'].length.should eq(10)
446446
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
447475
end
448476

449477
################################################################################

0 commit comments

Comments
 (0)
0