public void DeleteByQueryAsync <T>(string query, DeleteByQueryParameters parameters, Action <ConnectionStatus> callback) where T : class { query.ThrowIfNullOrEmpty("query"); var index = this.Settings.DefaultIndex; index.ThrowIfNullOrEmpty("Cannot infer default index for current connection."); var typeName = this.InferTypeName <T>(); var path = this.CreatePath(index, typeName); if (parameters != null && !parameters.Equals(default(DeleteByQueryParameters))) { path = this.AppendDeleteByQueryParametersToPath(path, parameters); } this._deleteToPathAsync(path, query, callback); }
public void DeleteByQueryOverIndicesAsync <T>(string query, IEnumerable <string> indices, DeleteByQueryParameters parameters, Action <ConnectionStatus> callback) where T : class { query.ThrowIfNullOrEmpty("query"); if (indices == null || !indices.Any()) { throw new ArgumentNullException("indices"); } var indicesString = string.Join(",", indices.ToArray()); var path = this.CreatePath(indicesString); if (parameters != null && !parameters.Equals(default(DeleteByQueryParameters))) { path = this.AppendDeleteByQueryParametersToPath(path, parameters); } this._deleteToPathAsync(path, query, callback); }
public ConnectionStatus DeleteByQueryOverIndices <T>(string query, IEnumerable <string> indices, IEnumerable <string> types, DeleteByQueryParameters parameters) where T : class { query.ThrowIfNullOrEmpty("query"); if (indices == null || !indices.Any()) { throw new ArgumentNullException("indices"); } if (types == null || !types.Any()) { throw new ArgumentNullException("types"); } var indicesString = string.Join(",", indices.ToArray()); var typesString = string.Join(",", indices.ToArray()); var path = this.CreatePath(indicesString, typesString); if (parameters != null && !parameters.Equals(default(DeleteByQueryParameters))) { path = this.AppendDeleteByQueryParametersToPath(path, parameters); } return(this._deleteToPath(path, query)); }