fixed merge issues
This commit is contained in:
@@ -6,21 +6,6 @@ using Umbraco.Core.Persistence.Querying;
|
||||
|
||||
namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
{
|
||||
internal static class SqlSyntaxProviderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the quotes tableName.columnName combo
|
||||
/// </summary>
|
||||
/// <param name="sql"></param>
|
||||
/// <param name="tableName"></param>
|
||||
/// <param name="columnName"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetQuotedColumn(this ISqlSyntaxProvider sql, string tableName, string columnName)
|
||||
{
|
||||
return sql.GetQuotedTableName(tableName) + "." + sql.GetQuotedColumnName(columnName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines an SqlSyntaxProvider
|
||||
/// </summary>
|
||||
|
||||
@@ -24,23 +24,4 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
}
|
||||
}
|
||||
|
||||
internal static class SqlSyntaxProviderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// This is used to generate a delete query that uses a sub-query to select the data, it is required because there's a very particular syntax that
|
||||
/// needs to be used to work for all servers: MySql, SQLCE and MSSQL
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// See: http://issues.umbraco.org/issue/U4-3876
|
||||
/// </remarks>
|
||||
public static string GetDeleteSubquery(this ISqlSyntaxProvider sqlProvider, string tableName, string columnName, Sql subQuery)
|
||||
{
|
||||
return string.Format(@"DELETE FROM {0} WHERE {1} IN (SELECT {1} FROM ({2}) x)",
|
||||
sqlProvider.GetQuotedTableName(tableName),
|
||||
sqlProvider.GetQuotedColumnName(columnName),
|
||||
subQuery.SQL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
{
|
||||
internal static class SqlSyntaxProviderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the quotes tableName.columnName combo
|
||||
/// </summary>
|
||||
/// <param name="sql"></param>
|
||||
/// <param name="tableName"></param>
|
||||
/// <param name="columnName"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetQuotedColumn(this ISqlSyntaxProvider sql, string tableName, string columnName)
|
||||
{
|
||||
return sql.GetQuotedTableName(tableName) + "." + sql.GetQuotedColumnName(columnName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is used to generate a delete query that uses a sub-query to select the data, it is required because there's a very particular syntax that
|
||||
/// needs to be used to work for all servers: MySql, SQLCE and MSSQL
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// See: http://issues.umbraco.org/issue/U4-3876
|
||||
/// </remarks>
|
||||
public static string GetDeleteSubquery(this ISqlSyntaxProvider sqlProvider, string tableName, string columnName, Sql subQuery)
|
||||
{
|
||||
return string.Format(@"DELETE FROM {0} WHERE {1} IN (SELECT {1} FROM ({2}) x)",
|
||||
sqlProvider.GetQuotedTableName(tableName),
|
||||
sqlProvider.GetQuotedColumnName(columnName),
|
||||
subQuery.SQL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1368,30 +1368,6 @@ namespace Umbraco.Core.Services
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
///// <summary>
|
||||
///// Internal method that Publishes a single <see cref="IContent"/> object for legacy purposes.
|
||||
///// </summary>
|
||||
///// <param name="content">The <see cref="IContent"/> to publish</param>
|
||||
///// <param name="userId">Optional Id of the User issueing the publishing</param>
|
||||
///// <returns>True if publishing succeeded, otherwise False</returns>
|
||||
//internal Attempt<PublishStatus> PublishInternal(IContent content, int userId = 0)
|
||||
//{
|
||||
// return SaveAndPublishDo(content, userId);
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// Internal method that Publishes a <see cref="IContent"/> object and all its children for legacy purposes.
|
||||
///// </summary>
|
||||
///// <param name="content">The <see cref="IContent"/> to publish along with its children</param>
|
||||
///// <param name="userId">Optional Id of the User issueing the publishing</param>
|
||||
///// <param name="includeUnpublished">If set to true, this will also publish descendants that are completely unpublished, normally this will only publish children that have previously been published</param>
|
||||
///// <returns>True if publishing succeeded, otherwise False</returns>
|
||||
//internal IEnumerable<Attempt<PublishStatus>> PublishWithChildrenInternal(
|
||||
// IContent content, int userId = 0, bool includeUnpublished = false)
|
||||
//{
|
||||
// return PublishWithChildrenDo(content, userId, includeUnpublished);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of <see cref="IContent"/> descendants by the first Parent.
|
||||
/// </summary>
|
||||
|
||||
@@ -339,6 +339,7 @@
|
||||
<Compile Include="Models\TaggableObjectTypes.cs" />
|
||||
<Compile Include="Models\TemplateNode.cs" />
|
||||
<Compile Include="Packaging\PackageBinaryInspector.cs" />
|
||||
<Compile Include="Persistence\SqlSyntax\SqlSyntaxProviderExtensions.cs" />
|
||||
<Compile Include="PropertyEditors\DefaultPropertyValueConverterAttribute.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSeven\UpdateRelatedLinksData.cs" />
|
||||
<Compile Include="PropertyEditors\IValueEditor.cs" />
|
||||
|
||||
Reference in New Issue
Block a user