SqlHelper Methods |
The SqlHelper type exposes the following members.
Name | Description | |
---|---|---|
AddColumnAlias |
Adds the column alias to the given expression
| |
AddColumns |
Adds the columns.
| |
AddOrderBy |
Adds the order by to an existing one.
| |
AddWhereCondition(String, String) |
Adds where condition to the expression using AND operator.
| |
AddWhereCondition(String, String, String) |
Adds where condition to the expression.
| |
AppendQuery |
Combines the given queries with the operator
| |
BuildIntList |
Builds the list of integers separated by colon. Does not remove duplicities. Output of this method can be consumed by
SQL table-valued function [Func_Selection_ParseIDs] which parses string and returns table.
| |
BuildIntTable |
Gets a table-valued parameter for database calls. Is intended for usage with CMS_Type_Integers database type.
| |
CombineQueries |
Combines the given queries with the operators
| |
EnsureFullName |
Ensures full name of the given column
| |
EnsureMissingColumns(ICollectionListString) |
Ensures the missing columns in the given lists of columns
| |
EnsureMissingColumns(IListString) |
Ensures the missing columns in the given lists of columns
| |
EnsureMissingColumns(ICollectionQueryColumnList) |
Ensures the missing columns in the given lists of columns
| |
EnsureOrderByColumns |
Ensures that the order by columns are provided within the list of columns as aliases, modifies the order by expression to the aliases of those columns
| |
EscapeLikeQueryPatterns |
Escapes characters for query which use LIKE pattern.
| |
EscapeLikeText |
Escapes characters for query which use LIKE pattern (%, _, [, ] and ^).
| |
EscapeQuotes |
Escapes single qoutes in string value used for SQL query (value's => value''s).
| |
ExceptQueries |
Returns the query created as an EXCEPT of the given queries.
| |
GetAggregation |
Gets the aggregation expression from the given expression
| |
GetAliasPathCondition |
Returns the where condition for node alias path expression.
| |
GetBetween |
Gets the condition matching values of the column between from and to
| |
GetCase |
Returns statement for the CASE expressions.
| |
GetCaseColumn |
Returns statement for column with case expressions.
This statement is used for evaluating a set of boolean expressions to determine the result. First case has highest priority.
| |
GetCaseOrderBy(IEnumerableString) |
Returns order by statement based on case boolean expressions. First case has highest priority.
| |
GetCaseOrderBy(String) |
Returns order by statement based on case boolean expressions. First case has highest priority.
| |
GetCast |
Get the CAST expression.
| |
GetColumnName |
Gets the column name from the given SQL column expression
| |
GetComment |
Gets a multiline SQL comment for simple input text (must not contain any open comment sequence)
| |
GetConvert |
Gets the convert expression.
| |
GetData | Obsolete.
Gets the data from the DataSet
| |
GetDBSchema |
Returns DB object scheme from settings.
| |
GetDBSchemaOrDefault |
Returns DB object scheme from settings or default value.
| |
GetIsNumeric |
Gets the ISNUMERIC expression.
| |
GetJoin |
Gets the join expression
| |
GetJoinType |
Gets the join expression
| |
GetNestedQuery |
Gets a nested query using nested SELECT for further evaluation
| |
GetOrderByColumnName(String) |
Gets the column name from the given SQL column expression
| |
GetOrderByColumnName(String, String) |
Gets the column name from the given SQL column expression
| |
GetPagedQuery | Obsolete.
Gets the query by its name and validates the query for paging
| |
GetParamCacheString |
Gets the parameters string.
| |
GetParameterName |
Gets the parameter name
| |
GetParamString |
Gets the parameters string.
| |
GetResultsString |
Gets the results as a string for log.
| |
GetRound |
Gets the round expression
| |
GetRowNumber |
Gets the row number expression
| |
GetSafeOwner |
Returns safe string representing DB owner.
| |
GetSafeQueryString(String) |
Returns safe sql query string - escapes apostrophes and escapes wildcard characters _, %, [].
| |
GetSafeQueryString(String, Boolean) |
Returns safe sql query string - escapes apostrophes and optionally escapes wildcard characters _, %, [].
| |
GetSelectQuery |
Gets the general select query
| |
GetSiteIDWhereCondition |
Returns the where condition for the give site ID.
| |
GetSqlValue |
Gets the value representation for a SQL query text
| |
GetValueExpression |
Gets the value expression from the given expression
| |
GetViewName |
Gets view name for specified table name.
| |
GetWhereCondition(String, IEnumerableString) |
Creates the where condition for the array of values.
| |
GetWhereCondition(String, IListInt32) |
Creates the where condition for the array of values.
| |
GetWhereCondition(String, Int32) |
Creates the where condition for the array of values.
| |
GetWhereCondition(String, IEnumerableString, Boolean) |
Creates the where condition for the array of values.
| |
GetWhereCondition(String, IListInt32, Boolean) |
Creates the where condition for the array of values.
| |
GetWhereConditionT(String, IEnumerableString, Boolean) |
Creates the where condition for the array of values.
| |
GetWhereConditionT(String, IEnumerableString, Boolean, Boolean) |
Creates the where condition for the array of values.
| |
HandleEmptyColumns |
Handles the empty columns constant by replacing it with empty string
| |
IntersectQueries |
Returns the query created as an INTERSECT of the given queries.
| |
IsMissing |
Returns true if the given value is missing or null.
| |
IsMissingOrNull |
Returns true if the given value is missing or null.
| |
IsSingleColumn |
Returns true, if the query output is a single column
| |
JoinColumnList |
Joins the given column list. Columns are separated by comma.
| |
MatchLikePattern |
Indicates whether string matches given SQL 'like' pattern.
| |
MergeColumns(IEnumerableString, IEnumerableString, FuncString, String, Boolean, FuncString, String) |
Merges the sets of columns and makes sure that each column in the result is present only once.
| |
MergeColumns(String, String, FuncString, String, Boolean, FuncString, String) |
Merges the sets of columns and makes sure that each column in the result is present only once.
| |
ObjectsEqual |
Returns true if two objects are equal.
| |
OrderByContains |
Returns true if the order by expression contains column sorted the specified way.
| |
ParseColumn |
Gets the column name from the given SQL column expression
| |
ParseColumnList |
Parses the given list of columns to a list (can handle also advanced columns containing functions like ISNULL(A, B) etc.).
| |
ParseList |
Gets the SQL expression to get a parsed list of data
| |
ParseOrderBy |
Parses order by expression and returns list of columns
| |
PreparePagedQuery |
Prepares the query for paging, adds additional system columns and updates the columns list.
| |
PreprocessQuery |
Preprocesses the give query.
| |
ProcessPagedResults |
Processes the page results - Removes the system columns and gets the total records number.
| |
QueriesEqual |
Returns true if two queries equal by their content. Ignores extra whitespaces and comments within the comparison
| |
RemoveComments |
Removes single line and simple multiline comments from a SQL query
| |
RemoveOwner |
Removes the owner from the given object name.
| |
ReverseOrderBy |
Reverses the order by string by toggling between ASC and DESC.
| |
UnionQueries(String) |
Returns the query created as an UNION ALL of given queries.
| |
UnionQueries(String, Boolean) |
Returns the query created as an UNION of the given queries.
|