Show / Hide Table of Contents

Class Query<TObject, TQuery>

Represents the base query class.

Inheritance
System.Object
Query<TObject, TQuery>
ObjectQuery<TObject>
ResourcePoolQuery<TObject>
Implements
System.Collections.Generic.IEnumerable<TObject>
System.Collections.IEnumerable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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 Source

Query(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 Source

Executor

Declaration
protected IQueryExecutor<TObject> Executor { get; }
Property Value
Type Description
IQueryExecutor<TObject>
| Improve this Doc View Source

Request

Declaration
protected IQueryRequest Request { get; }
Property Value
Type Description
IQueryRequest

Methods

| Improve this Doc View Source

Fetch(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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

FetchAll()

Specifies that query should fetch all object fields.

Declaration
public TQuery FetchAll()
Returns
Type Description
TQuery

The query object.

| Improve this Doc View Source

FetchOnlyArtifactID()

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

Declaration
public TQuery FetchOnlyArtifactID()
Returns
Type Description
TQuery

The query object.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX