Fixes RePublishAll method to ensure it performs the same function as the legacy Document.RePublishAll - it just
re-generates the XML in the cmsContentXml table. Updates the Sql providers to support truncate table. Updates the RepublishAll unit test. Adds a TruncateTable extension to PetaPoco. Adds locking to certain service methods that perform more than once function.
This commit is contained in:
@@ -31,6 +31,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
string InsertData { get; }
|
||||
string UpdateData { get; }
|
||||
string DeleteData { get; }
|
||||
string TruncateTable { get; }
|
||||
string CreateConstraint { get; }
|
||||
string DeleteConstraint { get; }
|
||||
string CreateForeignKeyConstraint { get; }
|
||||
|
||||
@@ -42,6 +42,14 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SqlCe doesn't support the Truncate Table syntax, so we just have to do a DELETE FROM which is slower but we have no choice.
|
||||
/// </summary>
|
||||
public override string TruncateTable
|
||||
{
|
||||
get { return "DELETE FROM {0}"; }
|
||||
}
|
||||
|
||||
public override string GetIndexType(IndexTypes indexTypes)
|
||||
{
|
||||
string indexType;
|
||||
|
||||
@@ -436,6 +436,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
public virtual string InsertData { get { return "INSERT INTO {0} ({1}) VALUES ({2})"; } }
|
||||
public virtual string UpdateData { get { return "UPDATE {0} SET {1} WHERE {2}"; } }
|
||||
public virtual string DeleteData { get { return "DELETE FROM {0} WHERE {1}"; } }
|
||||
public virtual string TruncateTable { get { return "TRUNCATE TABLE {0}"; } }
|
||||
|
||||
public virtual string CreateConstraint { get { return "ALTER TABLE {0} ADD CONSTRAINT {1} {2} ({3})"; } }
|
||||
public virtual string DeleteConstraint { get { return "ALTER TABLE {0} DROP CONSTRAINT {1}"; } }
|
||||
|
||||
Reference in New Issue
Block a user