SqlHelperMergeColumns Method (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.
Namespace: CMS.DataEngineAssembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 9.0.0
Syntax public static string MergeColumns(
string columns,
string addColumns,
Func<string, string> uniqueKey = null,
bool extraColumns = true,
Func<string, string> transformation = null
)
Parameters
- columns
- Type: SystemString
Original column list - addColumns
- Type: SystemString
List of columns to add - uniqueKey (Optional)
- Type: SystemFuncString, String
Function which provides unique key for the merging process (if two column keys match, the merging process allows only first column) - extraColumns (Optional)
- Type: SystemBoolean
Indicates if columns which are not part of '*' expression are merged to the existing list of columns - transformation (Optional)
- Type: SystemFuncString, String
Column transformation
Return Value
Type:
StringReturns the list separated by dashes for use in SQL query
See Also