Class ConditionBuilder
helper methods for building conditions for string / object key value pairs
Inheritance
Inherited Members
Namespace: TimeCockpit.Data.QueryLanguage
Assembly: TimeCockpit.Data.dll
Syntax
public class ConditionBuilder
Constructors
ConditionBuilder()
Declaration
public ConditionBuilder()
Properties
TCQLNullString
Gets the string representation of a null in TCQL.
Declaration
public static string TCQLNullString { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
BuildCondition(Dictionary<String, Object>, ModelEntityBase)
Builds a TCQL condition from a dictionary of string / object values. the object values in the dictionary should one of
Declaration
public static string BuildCondition(Dictionary<string, object> conditionParams, ModelEntityBase sourceEntity)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | conditionParams | the condition parameters used for building the condition. |
ModelEntityBase | sourceEntity | the source entity that the condition will be built agains. |
Returns
Type | Description |
---|---|
System.String | returns a tcql where condition as string. |
EscapeTCQLString(String)
replaces ' with '.
Declaration
public static string EscapeTCQLString(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | the string to escape. |
Returns
Type | Description |
---|---|
System.String | returns the orignal string with ' replaced by ' |
ToTCQLString(DateTime)
Converts a datetime to a TCQL compatible string
Declaration
public static string ToTCQLString(DateTime dateTime)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | dateTime | the datetime value to convert. |
Returns
Type | Description |
---|---|
System.String | returns the tcql compatible string representation of the datetime value. |
ToTCQLString(Guid)
converts a guid to a tcql string.
Declaration
public static string ToTCQLString(Guid guid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | guid | the guid to convert |
Returns
Type | Description |
---|---|
System.String | returns the tcql compatible string representation of the guid value. |
ToTCQLString(String)
Returns a string escaped to avoid tcql injection
Declaration
public static string ToTCQLString(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | the parameter to escape |
Returns
Type | Description |
---|---|
System.String | returns the string in single quotes with single quotes in the original string escaped. |