<PackageReference Include="Relativity.Server.Testing.Framework.Api.SDK" Version="5000.1.0" />

Query<TObject, TQuery>

public abstract class Query<TObject, TQuery> : IEnumerable<TObject>, IEnumerable where TQuery : Query<TObject, TQuery>
Represents the base query class.
protected IQueryExecutor<TObject> Executor { get; }

protected IQueryRequest Request { get; }

protected Query(IQueryRequest request, IQueryExecutor<TObject> executor)

public TQuery Fetch(string[] fieldNames)

Specifies the set of field names for query to fetch.

public TQuery Fetch(IEnumerable<string> fieldNames)

Specifies the set of field names for query to fetch.

public TQuery FetchAll()

Specifies that query should fetch all object fields.

public TQuery FetchOnlyArtifactID()

Specifies that query should fetch only "Artifact ID" field.

public IEnumerator<TObject> GetEnumerator()

Returns an enumerator that iterates through the collection.

public TQuery SetLength(int length)

Specifies the number of items to return in the query result.

public TQuery Where(Expression<Func<TObject, object>> propertySelector, object propertyValue)

Filters the query with specific field value.

public TQuery Where(string fieldName, object fieldValue)

Filters the query with specific field value.

public TQuery Where(string condition)

Filters the query by string condition.