Table of Contents

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
Object
ConditionBuilder
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

and should match the type of the property.
public static string BuildCondition(Dictionary<string, object> conditionParams, ModelEntityBase sourceEntity)

Parameters

conditionParams Dictionary<String, Object>

the condition parameters used for building the condition.

sourceEntity ModelEntityBase

the source entity that the condition will be built agains.

Returns

String

returns a tcql where condition as string.

EscapeTCQLString(String)

replaces ' with &apos;.

public static string EscapeTCQLString(string s)

Parameters

s String

the string to escape.

Returns

String

returns the orignal string with ' replaced by &apos;

ToTCQLString(DateTime)

Converts a datetime to a TCQL compatible string

public static string ToTCQLString(DateTime dateTime)

Parameters

dateTime DateTime

the 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

guid Guid

the 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

s String

the parameter to escape

Returns

String

returns the string in single quotes with single quotes in the original string escaped.