Class SmartSearchSQLHelper
- Namespace
- Dynamicweb.SmartSearch
- Assembly
- Dynamicweb.SmartSearch.dll
[Obsolete("Use SmartSearchSqlQueryHelper instead")]
public class SmartSearchSQLHelper
- Inheritance
-
SmartSearchSQLHelper
- Inherited Members
Methods
ConvertToDate(string)
Returns date value of given object
public static DateTime ConvertToDate(string value)
Parameters
value
string- Value to be converted to string
Returns
ConvertToString(object)
Returns string version of given object
public static string ConvertToString(object value)
Parameters
value
object- Value to be converted to string
Returns
EscapeValue(string)
Returns value ready for query
public static string EscapeValue(string value)
Parameters
value
string
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
dt
DateTime- DateTime 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
rule
SmartSearchRule- SmartSearch 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
pi
PropertyInfo- User property information
rule
SmartSearchRule- SmartSearch 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
fieldName
string- Sql field name
rule
SmartSearchRule- SmartSearch 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
customField
CustomField- User custom field
rule
SmartSearchRule- SmartSearch 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
pi
PropertyInfo- User property information
rule
SmartSearchRule- SmartSearch 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
fieldName
string- Sql field name
rule
SmartSearchRule- SmartSearch 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
tableName
string- Sql table name
fieldName
string- Sql field name
rule
SmartSearchRule- SmartSearch 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
fieldName
string- Sql field name
rule
SmartSearchRule- SmartSearch 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
tableName
string- Sql table name
fieldName
string- Sql field name
rule
SmartSearchRule- SmartSearch rule as base for query
Returns
GetGroupFilter(PropertyInfo, SmartSearchRule)
Builds filter with conditions based on user groups into sql query string for given property
public static string GetGroupFilter(PropertyInfo pi, SmartSearchRule rule)
Parameters
pi
PropertyInfo- User property information
rule
SmartSearchRule- SmartSearch 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
pi
PropertyInfo- User property information
rule
SmartSearchRule- SmartSearch 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
fieldName
string- Sql field name
rule
SmartSearchRule- SmartSearch 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
tableName
string- Sql table name
fieldName
string- Sql field name
rule
SmartSearchRule- SmartSearch 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
rule
SmartSearchRule- SmartSearch 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
pi
PropertyInfo- User property information
rule
SmartSearchRule- SmartSearch 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
fieldName
string- Sql field name
rule
SmartSearchRule- SmartSearch 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
fieldName
string- Sql field name
rule
SmartSearchRule- SmartSearch 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
pi
PropertyInfo- User property information
rule
SmartSearchRule- SmartSearch 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
value
IEnumerable<int>
Returns
RenderValue(IEnumerable<string>)
Render IEnumerable(Of String) into string for sql query
public static string RenderValue(IEnumerable<string> value)
Parameters
value
IEnumerable<string>
Returns
RenderValue(DateTime)
Render DateTime value into string for sql query
public static string RenderValue(DateTime value)
Parameters
value
DateTime
Returns
RenderValue(int)
Render Integer value into string for sql query
public static string RenderValue(int value)
Parameters
value
int
Returns
RenderValue(object)
Render Object value into string for sql query
public static string RenderValue(object value)
Parameters
value
object
Returns
RenderValue(string)
Render String value into string for sql query
public static string RenderValue(string value)
Parameters
value
string