Class ConditionBuilder
- Namespace
- TimeCockpit.Data.QueryLanguage
- Assembly
- TimeCockpit.Data.dll
helper methods for building conditions for string / object key value pairs
public class ConditionBuilder
- Inheritance
-
ObjectConditionBuilder
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
Constructors
ConditionBuilder()
public ConditionBuilder()
Properties
TCQLNullString
Gets the string representation of a null in TCQL.
public static string TCQLNullString { get; }
Property Value
- 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
public static string BuildCondition(Dictionary<string, object> conditionParams, ModelEntityBase sourceEntity)
Parameters
conditionParamsDictionary<String, Object>the condition parameters used for building the condition.
sourceEntityModelEntityBasethe source entity that the condition will be built agains.
Returns
- String
returns a tcql where condition as string.
EscapeTCQLString(String)
replaces ' with '.
public static string EscapeTCQLString(string s)
Parameters
sStringthe string to escape.
Returns
- String
returns the orignal string with ' replaced by '
ToTCQLString(DateTime)
Converts a datetime to a TCQL compatible string
public static string ToTCQLString(DateTime dateTime)
Parameters
dateTimeDateTimethe datetime value to convert.
Returns
- String
returns the tcql compatible string representation of the datetime value.
ToTCQLString(Guid)
converts a guid to a tcql string.
public static string ToTCQLString(Guid guid)
Parameters
guidGuidthe guid to convert
Returns
- String
returns the tcql compatible string representation of the guid value.
ToTCQLString(String)
Returns a string escaped to avoid tcql injection
public static string ToTCQLString(string s)
Parameters
sStringthe parameter to escape
Returns
- String
returns the string in single quotes with single quotes in the original string escaped.