Class DMConnectionUtility
- Namespace
- Dynamicweb.DataManagement
- Assembly
- Dynamicweb.DataManagement.dll
Provides DMConnection specific methods
public class DMConnectionUtility
- Inheritance
-
DMConnectionUtility
- Inherited Members
Methods
GenerateRowID(DataRow, DataColumn[])
Generated row id
public static string GenerateRowID(DataRow row, DataColumn[] columns)
Parameters
row
DataRowDataRow
columns
DataColumn[]Array of columns
Returns
- string
String with key value pairs of row column
GetSqlStringVariables(string)
Gets sql string variables from command text
public static IEnumerable<QueryVariable> GetSqlStringVariables(string sqlCommandText)
Parameters
sqlCommandText
stringSql command text
Returns
- IEnumerable<QueryVariable>
Collection of query vatriables
GetTableColumns(IDbConnection, string)
Gets collection of table fields
public static FieldCollection GetTableColumns(IDbConnection connection, string tableName)
Parameters
connection
IDbConnectionConnection to datasource
tableName
stringTable mane
Returns
- FieldCollection
Collection of fields
ParseRowID(string)
Parses row data
public static List<KeyValuePair<string, string>> ParseRowID(string rowID)
Parameters
rowID
string
Returns
- List<KeyValuePair<string, string>>
Row data as list of key-value pairs
ReplaceVariablesInSql(string, IEnumerable<QueryVariable>)
Replaces variables in command text
public static string ReplaceVariablesInSql(string sqlCommandText, IEnumerable<QueryVariable> variables)
Parameters
sqlCommandText
stringsql command text
variables
IEnumerable<QueryVariable>variables collection
Returns
- string
String of sql commnd with replaced variables