Class Query<TObject, TQuery>
Represents the base query class.
Implements
Inherited Members
Namespace: Relativity.Testing.Framework.Api.Querying
Assembly: Relativity.Testing.Framework.Api.dll
Syntax
public abstract class Query<TObject, TQuery> : IEnumerable<TObject>, IEnumerable where TQuery : Query<TObject, TQuery>
Type Parameters
Name | Description |
---|---|
TObject | The type of the object. |
TQuery | The type of the query. |
Constructors
| Improve this Doc View SourceQuery(IQueryRequest, IQueryExecutor<TObject>)
Declaration
protected Query(IQueryRequest request, IQueryExecutor<TObject> executor)
Parameters
Type | Name | Description |
---|---|---|
IQueryRequest | request | |
IQueryExecutor<TObject> | executor |
Properties
| Improve this Doc View SourceExecutor
Declaration
protected IQueryExecutor<TObject> Executor { get; }
Property Value
Type | Description |
---|---|
IQueryExecutor<TObject> |
Request
Declaration
protected IQueryRequest Request { get; }
Property Value
Type | Description |
---|---|
IQueryRequest |
Methods
| Improve this Doc View SourceFetch(IEnumerable<String>)
Specifies the set of field names for query to fetch.
Declaration
public TQuery Fetch(IEnumerable<string> fieldNames)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | fieldNames | The field names. |
Returns
Type | Description |
---|---|
TQuery | The query object. |
Fetch(String[])
Specifies the set of field names for query to fetch.
Declaration
public TQuery Fetch(params string[] fieldNames)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | fieldNames | The field names. |
Returns
Type | Description |
---|---|
TQuery | The query object. |
FetchAll()
Specifies that query should fetch all object fields.
Declaration
public TQuery FetchAll()
Returns
Type | Description |
---|---|
TQuery | The query object. |
FetchOnlyArtifactID()
Specifies that query should fetch only "Artifact ID" field.
Declaration
public TQuery FetchOnlyArtifactID()
Returns
Type | Description |
---|---|
TQuery | The query object. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<TObject> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<TObject> | An enumerator that can be used to iterate through the collection. |
SetLength(Int32)
Specifies the number of items to return in the query result.
Declaration
public TQuery SetLength(int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | length | The number of items to return in the query result, starting with index in the start parameter. |
Returns
Type | Description |
---|---|
TQuery | The query object. |
Where(Expression<Func<TObject, Object>>, Object)
Filters the query with specific field value.
Declaration
public TQuery Where(Expression<Func<TObject, object>> propertySelector, object propertyValue)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Func<TObject, System.Object>> | propertySelector | The property selector. |
System.Object | propertyValue | The property value. |
Returns
Type | Description |
---|---|
TQuery | The query object. |
Where(String)
Filters the query by string condition.
Declaration
public TQuery Where(string condition)
Parameters
Type | Name | Description |
---|---|---|
System.String | condition | The string representation of condition. |
Returns
Type | Description |
---|---|
TQuery | The query object. |
Where(String, Object)
Filters the query with specific field value.
Declaration
public TQuery Where(string fieldName, object fieldValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | fieldName | The name of the field. |
System.Object | fieldValue | The field value. |
Returns
Type | Description |
---|---|
TQuery | The query object. |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |