使用 arangoDB .net 客户端查询时如何避免错误 17?

How can I avoid Error 17 when query'ing with arangoDB .net client?

我查询时一直收到 "expecting non-zero value for . ErrorNumber: 17 HttpStatusCode: 400"。我已尝试尽可能接近 the example 实施它:

示例:

    [Test]
    public void CanQueryDB()
    {
        using (var db = new ArangoDatabase("http://localhost:8529", database: "test"))
        {
            var exDb = db.ListDatabases();
            if (exDb.Contains("test"))
            {
                db.DropDatabase("test");
            }
            db.CreateDatabase("test");


            var obj = new SomeClass() {Key = "1", Text = "Heyheyhey!"};
            _db.Insert<RelevanceContext>(obj);
            Assert.That(() =>

                //How else would you do it?
                _db.Query<RelevanceContext>().Where(x => true).ToArray()

                , Throws.Nothing);
        }
    }

    public class SomeClass
    {
        [DocumentProperty(Identifier = IdentifierType.Key)]
        public string Key;
        public string Text;
    }

结果:

Test Name:  CanQueryDB
Test FullName:  Xpectra.ReadServiceTests.Contexts.NotesReadModel.NotesEventHandlerTest.CanQueryDB
Test Source:    C:\Code\Xpectra\Tests\Xpectra.ReadServiceTests\Contexts\NotesReadModel\NotesEventHandlerTest.cs : line 48
Test Outcome:   Failed
Test Duration:  0:00:02,313

Result StackTrace:  at Xpectra.ReadServiceTests.Contexts.NotesReadModel.NotesEventHandlerTest.CanQueryDB() in C:\Code\Xpectra\Tests\Xpectra.ReadServiceTests\Contexts\NotesReadModel\NotesEventHandlerTest.cs:line 60
Result Message: 
Expected: No Exception to be thrown
  But was:   (expecting non-zero value for <batchSize>. ErrorNumber: 17 HttpStatusCode: 400)
   at ArangoDB.Client.BaseResultAnalyzer.ThrowIfNeeded(BaseResult baseResult)
   at ArangoDB.Client.Cursor.CursorAsyncEnumerator`1.<SetCurrent>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ArangoDB.Client.Cursor.CursorAsyncEnumerator`1.<MoveNextAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at ArangoDB.Client.Utility.TaskUtils.ResultSynchronizer[T](Task`1 task)
   at ArangoDB.Client.Cursor.CursorEnumerator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Xpectra.ReadServiceTests.Contexts.NotesReadModel.NotesEventHandlerTest.<CanQueryDB>b__5_0() in C:\Code\Xpectra\Tests\Xpectra.ReadServiceTests\Contexts\NotesReadModel\NotesEventHandlerTest.cs:line 60
   at NUnit.Framework.Constraints.GenericInvocationDescriptor`1.Invoke()
   at NUnit.Framework.Constraints.ExceptionInterceptor.Intercept(Object invocation)

我正在使用 ArangoDB.Client v. 0.7.2.1(nuget.org 上的最新稳定版本)和 运行 AngoroDB-2.7.0 (win64)。我也试过 v. 2.6.9,但还是一样。

我可以毫无问题地插入和更新

问题是序列化 aql 选项,现在已修复

对于造成的任何不便,我们深表歉意

下载新的 nuget 包在 https://www.nuget.org/packages/ArangoDB.Client