Table of Contents

Class QueryRequest

Namespace
TimeCockpit.Data
Assembly
TimeCockpit.Data.dll

Encapsulates all the information required to execute a query as well as the state of execution and the result.

public class QueryRequest
Inheritance
Object
QueryRequest
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

Remarks

Contains the following:

Properties

Cache

Gets or sets the select cache.

public SelectCache Cache { get; set; }

Property Value

SelectCache

CompletionSource

Gets the completion source for the query.

public TaskCompletionSource<EntityObject[]> CompletionSource { get; }

Property Value

TaskCompletionSource<EntityObject[]>

Parameters

Gets the query parameters.

public IEnumerable<QueryParameter> Parameters { get; }

Property Value

IEnumerable<QueryParameter>

QueryTask

Gets the task producing the result of the query.

public Task<EntityObject[]> QueryTask { get; }

Property Value

Task<EntityObject[]>

QueryTCQL

Gets the string representation of the query.

public string QueryTCQL { get; }

Property Value

String

Settings

Gets or sets the select settings.

public SelectSettings Settings { get; set; }

Property Value

SelectSettings

Methods

Create(String, IEnumerable<QueryParameter>, SelectSettings)

Creates a new query object.

public static QueryRequest Create(string query, IEnumerable<QueryParameter> parameters = null, SelectSettings settings = null)

Parameters

query String

The query to use.

parameters IEnumerable<QueryParameter>

The query parameters.

settings SelectSettings

The select settings.

Returns

QueryRequest

Returns a new query object.

Create(Query, IEnumerable<QueryParameter>, SelectSettings)

Creates query request using an AST representation of a Query.

public static QueryRequest Create(Query queryAST, IEnumerable<QueryParameter> parameters = null, SelectSettings settings = null)

Parameters

queryAST Query

The query AST to select.

parameters IEnumerable<QueryParameter>

The query parameters to use.

settings SelectSettings

The select settings to use for the query.

Returns

QueryRequest

Returns the query request.

Parameter(String, Object)

Creates a query parameter for the query.

public static QueryParameter Parameter(string name, object value)

Parameters

name String

The name of the parameter.

value Object

The value of the parameter.

Returns

QueryParameter

Returns a new query parameter.