SqlHelper MembersKentico 8.0 API Reference
The SqlHelper type exposes the following members.
Methods

  NameDescription
Public methodStatic memberAddColumnAlias
Adds the column alias to the given expression
Public methodStatic memberAddColumns
Adds the columns.
Public methodStatic memberAddOrderBy
Adds the order by to en existing one.
Public methodStatic memberAddWhereCondition(String, String)
Adds where condition to the expression using AND operator.
Public methodStatic memberAddWhereCondition(String, String, String)
Adds where condition to the expression.
Public methodStatic memberEnsureFullName
Ensures full name of the given column
Public methodStatic memberEnsureMissingColumns(ICollection List String  )
Ensures the missing columns in the given lists of columns
Public methodStatic memberEnsureMissingColumns(IList String )
Ensures the missing columns in the given lists of columns
Public methodStatic memberEnsureOrderByColumns
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
Public methodStatic memberEscapeLikeQueryPatterns
Escapes characters for query which use LIKE pattern.
Public methodStatic memberGetAliasPathCondition
Returns the where condition for node alias path expression.
Public methodStatic memberGetBetween
Gets the condition matching values of the column between from and to
Public methodStatic memberGetCaseColumn
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.
Public methodStatic memberGetCaseOrderBy(IEnumerable String )
Returns order by statement based on case boolean expressions. First case has highest priority.
Public methodStatic memberGetCaseOrderBy( String )
Returns order by statement based on case boolean expressions. First case has highest priority.
Public methodStatic memberGetColumnName
Gets the column name from the given SQL column expression
Public methodStatic memberGetData
Gets the data from the DataSet
Public methodStatic memberGetDBSchema
Returns DB object scheme from settings.
Public methodStatic memberGetDBSchemaOrDefault
Returns DB object scheme from settings or default value.
Public methodStatic memberGetJoin
Gets the join expression
Public methodStatic memberGetJoinType
Gets the join expression
Public methodStatic memberGetNestedQuery
Gets a nested query using nested SELECT for further evaluation
Public methodStatic memberGetOrderByColumnName(String)
Gets the column name from the given SQL column expression
Public methodStatic memberGetOrderByColumnName(String, String )
Gets the column name from the given SQL column expression
Public methodStatic memberGetPagedQuery
Gets the query by its name and validates the query for paging
Public methodStatic memberGetParamCacheString
Gets the parameters string.
Public methodStatic memberGetParameterName
Gets the parameter name
Public methodStatic memberGetParamString
Gets the parameters string.
Public methodStatic memberGetResultsString
Gets the results as a string for log.
Public methodStatic memberGetSafeOwner
Returns safe string representing DB owner.
Public methodStatic memberGetSafeQueryString(String)
Returns safe sql query string - escapes apostrophes and escapes wildcard characters _, %, [].
Public methodStatic memberGetSafeQueryString(String, Boolean)
Returns safe sql query string - escapes apostrophes and optionally escapes wildcard characters _, %, [].
Public methodStatic memberGetSelectQuery
Gets the general select query
Public methodStatic memberGetSiteIDWhereCondition
Returns the where condition for the give site ID.
Public methodStatic memberGetSqlValue
Gets the value representation for a SQL query text
Public methodStatic memberGetViewName
Gets view name for specified table name.
Public methodStatic memberGetWhereCondition(String, IEnumerable String )
Creates the where condition for the array of values.
Public methodStatic memberGetWhereCondition(String, IList Int32 )
Creates the where condition for the array of values.
Public methodStatic memberGetWhereCondition(String, Int32)
Creates the where condition for the array of values.
Public methodStatic memberGetWhereCondition(String, IEnumerable String , Boolean)
Creates the where condition for the array of values.
Public methodStatic memberGetWhereCondition(String, IList Int32 , Boolean)
Creates the where condition for the array of values.
Public methodStatic memberGetWhereCondition T (String, IEnumerable String , Boolean)
Creates the where condition for the array of values.
Public methodStatic memberGetWhereCondition T (String, IEnumerable String , Boolean, Boolean)
Creates the where condition for the array of values.
Public methodStatic memberHandleEmptyColumns
Handles the empty columns constant by replacing it with empty string
Public methodStatic memberIsMissing
Returns true if the given value is missing or null.
Public methodStatic memberIsMissingOrNull
Returns true if the given value is missing or null.
Public methodStatic memberIsSingleColumn
Returns true, if the query output is a single column
Public methodStatic memberJoinColumnList
Joins the given column list. Columns are separated by comma.
Public methodStatic memberMergeColumns(IEnumerable String , IEnumerable String , Func String, String , Boolean, Func String, String )
Merges the sets of columns and makes sure that each column in the result is present only once.
Public methodStatic memberMergeColumns(String, String, Func String, String , Boolean, Func String, String )
Merges the sets of columns and makes sure that each column in the result is present only once.
Public methodStatic memberObjectsEqual
Returns true if two objects are equal.
Public methodStatic memberOrderByContains
Returns true if the order by expression contains column sorted the specified way.
Public methodStatic memberParseColumnList
Parses the given list of columns to a list (can handle also advanced columns containing functions like ISNULL(A, B) etc.).
Public methodStatic memberParseOrderBy
Parses order by expression and returns list of columns
Public methodStatic memberPreparePagedQuery
Prepares the query for paging, adds additional system columns and updates the columns list.
Public methodStatic memberPreprocessQuery
Preprocesses the give query.
Public methodStatic memberProcessPagedResults
Processes the page results - Removes the system columns and gets the total records number.
Public methodStatic memberQueriesEqual
Returns true if two queries equal by their content. Ignores extra whitespaces and comments within the comparison
Public methodStatic memberRemoveComments
Removes comments from a SQL query
Public methodStatic memberRemoveOwner
Removes the owner from the given object name.
Public methodStatic memberReverseOrderBy
Reverses the order by string by toggling between ASC and DESC.
Public methodStatic memberUnionQueries( String )
Returns the query created as an union of given queries.
Public methodStatic memberUnionQueries( String , Boolean)
Returns the query created as an union of given queries.
Back to Top
Fields

  NameDescription
Public fieldStatic memberCOLUMNS_ALL
Represents all columns within given query
Public fieldStatic memberCommentsRegEx
Regex matching comments within a SQL query
Public fieldStatic memberDEFAULT_DB_SCHEMA
Default db schema.
Public fieldStatic memberGENERAL_SELECT
General select SQL statement
Public fieldStatic memberIsWildCardRegEx
Regex matching the wildcard within alias path.
Public fieldStatic memberMAX_PARAM_LENGTH
Maximum parameter length to log.
Public fieldStatic memberMISSING_VALUE
Unknown value.
Public fieldStatic memberNO_COLUMNS
Constant for no columns.
Public fieldStatic memberNO_DATA_WHERE
Where condition representing no data.
Public fieldStatic memberNO_TOTALRECORDS
Value for total records input to not get the total amount of data.
Public fieldStatic memberORDERBY_ASC
Suffix for the ascending order
Public fieldStatic memberORDERBY_DESC
Suffix for the descending order
Public fieldStatic memberRemoveWildCardRegEx
Regex for matching the escaped content within alias path.
Back to Top
Properties

  NameDescription
Public propertyStatic memberRunningQueries
Counter of running queries.
Back to Top
See Also