diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/ISqlSyntaxProvider.cs b/src/Umbraco.Core/Persistence/SqlSyntax/ISqlSyntaxProvider.cs index 1420a4214a..2b31fb2032 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/ISqlSyntaxProvider.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/ISqlSyntaxProvider.cs @@ -6,21 +6,6 @@ using Umbraco.Core.Persistence.Querying; namespace Umbraco.Core.Persistence.SqlSyntax { - internal static class SqlSyntaxProviderExtensions - { - /// - /// Returns the quotes tableName.columnName combo - /// - /// - /// - /// - /// - public static string GetQuotedColumn(this ISqlSyntaxProvider sql, string tableName, string columnName) - { - return sql.GetQuotedTableName(tableName) + "." + sql.GetQuotedColumnName(columnName); - } - } - /// /// Defines an SqlSyntaxProvider /// diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxContext.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxContext.cs index 34d2ff616b..0de58b7c0f 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxContext.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxContext.cs @@ -24,23 +24,4 @@ namespace Umbraco.Core.Persistence.SqlSyntax } } - internal static class SqlSyntaxProviderExtensions - { - /// - /// 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 - /// - /// - /// - /// See: http://issues.umbraco.org/issue/U4-3876 - /// - 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); - } - - } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderExtensions.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderExtensions.cs new file mode 100644 index 0000000000..fedd13dd8d --- /dev/null +++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderExtensions.cs @@ -0,0 +1,33 @@ +namespace Umbraco.Core.Persistence.SqlSyntax +{ + internal static class SqlSyntaxProviderExtensions + { + /// + /// Returns the quotes tableName.columnName combo + /// + /// + /// + /// + /// + public static string GetQuotedColumn(this ISqlSyntaxProvider sql, string tableName, string columnName) + { + return sql.GetQuotedTableName(tableName) + "." + sql.GetQuotedColumnName(columnName); + } + + /// + /// 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 + /// + /// + /// + /// See: http://issues.umbraco.org/issue/U4-3876 + /// + 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); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index 09d2f74da3..2dcd34e451 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -1368,30 +1368,6 @@ namespace Umbraco.Core.Services #region Internal Methods - ///// - ///// Internal method that Publishes a single object for legacy purposes. - ///// - ///// The to publish - ///// Optional Id of the User issueing the publishing - ///// True if publishing succeeded, otherwise False - //internal Attempt PublishInternal(IContent content, int userId = 0) - //{ - // return SaveAndPublishDo(content, userId); - //} - - ///// - ///// Internal method that Publishes a object and all its children for legacy purposes. - ///// - ///// The to publish along with its children - ///// Optional Id of the User issueing the publishing - ///// If set to true, this will also publish descendants that are completely unpublished, normally this will only publish children that have previously been published - ///// True if publishing succeeded, otherwise False - //internal IEnumerable> PublishWithChildrenInternal( - // IContent content, int userId = 0, bool includeUnpublished = false) - //{ - // return PublishWithChildrenDo(content, userId, includeUnpublished); - //} - /// /// Gets a collection of descendants by the first Parent. /// diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index cfb88c8bbd..de40c4a1c0 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -339,6 +339,7 @@ +