예제 #1
0
 public async Task CreateAsync(ArangoHandle database, string collection, ArangoIndex request,
                               CancellationToken cancellationToken = default)
 {
     await SendAsync <JObject>(HttpMethod.Post,
                               ApiPath(database, $"index?collection={collection}"),
                               JsonConvert.SerializeObject(request), cancellationToken : cancellationToken);
 }
예제 #2
0
 public async Task CreateAsync(ArangoHandle database, string collection, ArangoIndex request,
                               CancellationToken cancellationToken = default)
 {
     await SendAsync <ArangoVoid>(database, HttpMethod.Post,
                                  ApiPath(database, $"index?collection={collection}"),
                                  request, cancellationToken : cancellationToken);
 }
예제 #3
0
 public async Task EnsureIndexAsync(ArangoHandle database, string collection, ArangoIndex request,
                                    CancellationToken cancellationToken = default)
 {
     await SendAsync <JObject>(HttpMethod.Post,
                               $"{Server}/_db/{DbName(database)}/_api/index?collection={collection}",
                               JsonConvert.SerializeObject(request), cancellationToken : cancellationToken);
 }