public string GenerateUndoDeltaFragmentFooter(ChangeScript changeScript) { StringBuilder builder = new StringBuilder(); builder.AppendLine("DELETE FROM " + TableName + " WHERE ChangeNumber = " + changeScript.GetId() + " AND Project = '" + _deltaSet + "'" + DbmsSyntax.GenerateStatementDelimiter()); builder.AppendLine(DbmsSyntax.GenerateCommit()); builder.Append("--------------- Fragment ends: " + changeScript + " ---------------"); return(builder.ToString()); }
public string GenerateDoDeltaFragmentHeader(ChangeScript changeScript) { StringBuilder builder = new StringBuilder(); builder.AppendLine("--------------- Fragment begins: " + changeScript + " ---------------"); builder.AppendLine("INSERT INTO " + TableName + " (ChangeNumber, Project, StartDate, AppliedBy, FileName)" + " VALUES (" + changeScript.GetId() + ", '" + _deltaSet + "', " + DbmsSyntax.GenerateTimestamp() + ", " + DbmsSyntax.GenerateChangeOwner() + ", '" + changeScript.GetDescription() + "')" + DbmsSyntax.GenerateStatementDelimiter()); builder.Append(DbmsSyntax.GenerateCommit()); return(builder.ToString()); }