Class SmartSearchSqlQueryHelper
- Namespace
- Dynamicweb.SmartSearch
- Assembly
- Dynamicweb.Core.dll
Represents smart search Sql query helper
public class SmartSearchSqlQueryHelper
- Inheritance
-
SmartSearchSqlQueryHelper
- Inherited Members
Methods
ConvertToDate(string)
Returns date value of given object
public static DateTime ConvertToDate(string value)
Parameters
valuestringValue to be converted to string
Returns
ConvertToString(object)
Returns string version of given object
public static string ConvertToString(object value)
Parameters
valueobjectValue to be converted to string
Returns
EscapeValue(string?)
Returns value ready for query
public static string EscapeValue(string? value)
Parameters
valuestring
Returns
EscapeValueForLike(string?, char)
Returns value ready for query with like operator
public static string EscapeValueForLike(string? value, char escapeCharacter = '\\')
Parameters
Returns
Format(DateTime)
Returns formated date value as string
public static string Format(DateTime dt)
Parameters
dtDateTimeDateTime value to be converted to string
Returns
GetAuditFilter(SmartSearchRule)
Builds filter with conditions based on user audit information into sql query string for given property
public static string GetAuditFilter(SmartSearchRule rule)
Parameters
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetBooleanFilter(PropertyInfo, SmartSearchRule)
Builds boolean filter into sql query string for given property
public static string GetBooleanFilter(PropertyInfo pi, SmartSearchRule rule)
Parameters
piPropertyInfoUser property information
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetBooleanWherePart(string, SmartSearchRule)
Returns where part based on rule with boolean values
public static string GetBooleanWherePart(string fieldName, SmartSearchRule rule)
Parameters
fieldNamestringSql field name
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetCustomFilter(CustomField, SmartSearchRule)
Returns where part based on rule with custom fields
public static string GetCustomFilter(CustomField customField, SmartSearchRule rule)
Parameters
customFieldCustomFieldUser custom field
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetDateTimeFilter(PropertyInfo, SmartSearchRule)
Builds string filter into sql query string for given property
public static string GetDateTimeFilter(PropertyInfo pi, SmartSearchRule rule)
Parameters
piPropertyInfoUser property information
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetDateWherePart(string, SmartSearchRule)
Returns where part based on rule with date values
public static string GetDateWherePart(string fieldName, SmartSearchRule rule)
Parameters
fieldNamestringSql field name
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetDateWherePart(string, string, SmartSearchRule)
Returns where part based on rule with date values
public static string GetDateWherePart(string tableName, string fieldName, SmartSearchRule rule)
Parameters
tableNamestringSql table name
fieldNamestringSql field name
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetFloatWherePart(string, SmartSearchRule)
Returns where part based on rule with float values
public static string GetFloatWherePart(string fieldName, SmartSearchRule rule)
Parameters
fieldNamestringSql field name
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetFloatWherePart(string, string, SmartSearchRule)
Returns where part based on rule with float values
public static string GetFloatWherePart(string tableName, string fieldName, SmartSearchRule rule)
Parameters
tableNamestringSql table name
fieldNamestringSql field name
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetIntegerFilter(PropertyInfo, SmartSearchRule)
Builds integer filter into sql query string for given property
public static string GetIntegerFilter(PropertyInfo pi, SmartSearchRule rule)
Parameters
piPropertyInfoUser property information
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetIntegerWherePart(string, SmartSearchRule)
Returns where part based on rule with integer values
public static string GetIntegerWherePart(string fieldName, SmartSearchRule rule)
Parameters
fieldNamestringSql field name
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetIntegerWherePart(string, string, SmartSearchRule)
Returns where part based on rule with integer values
public static string GetIntegerWherePart(string tableName, string fieldName, SmartSearchRule rule)
Parameters
tableNamestringSql table name
fieldNamestringSql field name
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetIsAdminFilter(SmartSearchRule)
Builds filter with conditions based on is user type is admin into sql query string for given property
public static string GetIsAdminFilter(SmartSearchRule rule)
Parameters
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetStringFilter(PropertyInfo, SmartSearchRule)
Builds string filter into sql query string for given property
public static string GetStringFilter(PropertyInfo pi, SmartSearchRule rule)
Parameters
piPropertyInfoUser property information
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetStringWherePart(string, SmartSearchRule)
Returns where part based on rule with string values
public static string GetStringWherePart(string fieldName, SmartSearchRule rule)
Parameters
fieldNamestringSql field name
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetUserIdWherePart(string, SmartSearchRule)
Returns where part based on rule with User id conditions
public static string GetUserIdWherePart(string fieldName, SmartSearchRule rule)
Parameters
fieldNamestringSQL field name
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
GetUserTypeFilter(PropertyInfo, SmartSearchRule)
Builds string filter into sql query string for given property
public static string GetUserTypeFilter(PropertyInfo pi, SmartSearchRule rule)
Parameters
piPropertyInfoUser property information
ruleSmartSearchRuleSmartSearch rule as base for query
Returns
RenderOperator(SmartSearchRuleOperator)
Render SmartSerach rule operator into string for sql query
public static string RenderOperator(SmartSearchRuleOperator op)
Parameters
Returns
RenderValue(IEnumerable<int>)
Render IEnumerable(Of Integer) into string for sql query
public static string RenderValue(IEnumerable<int> value)
Parameters
valueIEnumerable<int>
Returns
RenderValue(IEnumerable<string>)
Render IEnumerable(Of String) into string for sql query
public static string RenderValue(IEnumerable<string> value)
Parameters
valueIEnumerable<string>
Returns
RenderValue(DateTime)
Render DateTime value into string for sql query
public static string RenderValue(DateTime value)
Parameters
valueDateTime
Returns
RenderValue(int)
Render Integer value into string for sql query
public static string RenderValue(int value)
Parameters
valueint
Returns
RenderValue(object?)
Render Object value into string for sql query
public static string RenderValue(object? value)
Parameters
valueobject
Returns
RenderValue(string?)
Render String value into string for sql query
public static string RenderValue(string? value)
Parameters
valuestring