coronabytes / dotnet-arangodb

.NET Driver for ArangoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ArangoDocumentModule Enhancement - Add optional throwOnError parameter when getting document (default to true)

clintmorgan opened this issue · comments

  • ArangoDocumentModule (default to true to maintain backward compatibility)
        public async Task<T> GetAsync<T>(ArangoHandle database, string collection, string key,
            CancellationToken cancellationToken = default, bool throwOnError = true) where T : class
        {
            return await SendAsync<T>(HttpMethod.Get, ApiPath(database, $"document/{UrlEncode(collection)}/{key}"),
                null, database.Transaction, throwOnError: throwOnError, cancellationToken: cancellationToken);
        }

  • Corresponding change in IArangoDocumentModule
        Task<T> GetAsync<T>(ArangoHandle database,
            string collection,
            string key,
            CancellationToken cancellationToken = default,
            bool throwOnError = true) where T : class;