U4-4847 Refactor ContentService (#1266)
* U4-4748 - refactor Content-, Media- and MemberTypeRepository * Cleanup Attempt * Cleanup OperationStatus * U4-4748 - refactor Content-, Media- and MemberTypeService * U4-4748 - cleanup locking * U4-4748 - refactor Content-, Media- and MemberRepository * U4-4748 - refactor ContentService (in progress) * U4-4748 - all unit of work must be completed * U4-4748 - refactor locks, fix tests * U4-4748 - deal with fixmes * U4-4748 - lock table migration * Update UmbracoVersion * Fix AuthorizeUpgrade * U4-4748 - cleanup+bugfix lock objects * U4-4748 - bugfix * updates a string interpolation
This commit is contained in:
committed by
Shannon Deminick
parent
12f4873c90
commit
ddf38407d8
@@ -17,6 +17,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
string GetWildcardPlaceholder();
|
||||
string GetStringColumnEqualComparison(string column, int paramIndex, TextColumnType columnType);
|
||||
string GetStringColumnWildcardComparison(string column, int paramIndex, TextColumnType columnType);
|
||||
string GetConcat(params string[] args);
|
||||
|
||||
[Obsolete("Use the overload with the parameter index instead")]
|
||||
string GetStringColumnEqualComparison(string column, string value, TextColumnType columnType);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
/// <summary>
|
||||
/// Represents an SqlSyntaxProvider for MySql
|
||||
/// </summary>
|
||||
[SqlSyntaxProviderAttribute(Constants.DbProviderNames.MySql)]
|
||||
[SqlSyntaxProvider(Constants.DbProviderNames.MySql)]
|
||||
public class MySqlSyntaxProvider : SqlSyntaxProviderBase<MySqlSyntaxProvider>
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
|
||||
@@ -11,14 +11,9 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
/// <summary>
|
||||
/// Represents an SqlSyntaxProvider for Sql Ce
|
||||
/// </summary>
|
||||
[SqlSyntaxProviderAttribute(Constants.DbProviderNames.SqlCe)]
|
||||
[SqlSyntaxProvider(Constants.DbProviderNames.SqlCe)]
|
||||
public class SqlCeSyntaxProvider : MicrosoftSqlSyntaxProviderBase<SqlCeSyntaxProvider>
|
||||
{
|
||||
public SqlCeSyntaxProvider()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override bool SupportsClustered()
|
||||
{
|
||||
return false;
|
||||
@@ -64,7 +59,10 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override string GetConcat(params string[] args)
|
||||
{
|
||||
return "(" + string.Join("+", args) + ")";
|
||||
}
|
||||
|
||||
public override string FormatColumnRename(string tableName, string oldName, string newName)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
public string DateTimeColumnDefinition = "DATETIME";
|
||||
public string TimeColumnDefinition = "DATETIME";
|
||||
|
||||
protected IList<Func<ColumnDefinition, string>> ClauseOrder { get; set; }
|
||||
protected IList<Func<ColumnDefinition, string>> ClauseOrder { get; }
|
||||
|
||||
protected DbTypes DbTypeMap = new DbTypes();
|
||||
protected void InitColumnTypeMap()
|
||||
@@ -172,6 +172,11 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
return string.Format("upper({0}) LIKE '{1}'", column, value.ToUpper());
|
||||
}
|
||||
|
||||
public virtual string GetConcat(params string[] args)
|
||||
{
|
||||
return "concat(" + string.Join(",", args) + ")";
|
||||
}
|
||||
|
||||
public virtual string GetQuotedTableName(string tableName)
|
||||
{
|
||||
return string.Format("\"{0}\"", tableName);
|
||||
|
||||
Reference in New Issue
Block a user