Class QueryHelper
Helper classes for dealing with TCQL queries.
Inheritance
System.Object
QueryHelper
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: TimeCockpit.Data.QueryLanguage
Assembly: TimeCockpit.Data.dll
Syntax
public static class QueryHelper
Methods
GetResultEntityAndIncludedRelations(String, Model, SelectSettings, IEnumerable<QueryParameter>, Boolean)
Gets the result entity and the path of the included relations.
Declaration
public static Tuple<ModelEntityBase, IEnumerable<string>> GetResultEntityAndIncludedRelations(string query, Model model, SelectSettings settings, IEnumerable<QueryParameter> parameters, bool supportsTVP)
Parameters
Type | Name | Description |
---|---|---|
System.String | query | The query to analyze. |
Model | model | The model. |
SelectSettings | settings | The select settings. |
System.Collections.Generic.IEnumerable<QueryParameter> | parameters | The query parameters. |
System.Boolean | supportsTVP | True if the target supports table valued parameters, false otherwise. |
Returns
Type | Description |
---|---|
System.Tuple<ModelEntityBase, System.Collections.Generic.IEnumerable<System.String>> | Returns the result entity. |
GetResultModelEntity(String, Model, IEnumerable<QueryParameter>, Environment)
Gets the resulting entity of a TCQL query.
Declaration
public static ModelEntityBase GetResultModelEntity(string query, Model model, IEnumerable<QueryParameter> parameters = null, Environment environment = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | query | The query to parse. |
Model | model | The model. |
System.Collections.Generic.IEnumerable<QueryParameter> | parameters | The parameters to pass. |
Environment | environment | The environment to pass to the AST. |
Returns
Type | Description |
---|---|
ModelEntityBase | Returns the model entity describing the result type. |