Skip to content

Replace delete statements that truncate tables #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/tSQLt.Private_CleanTestResult.ssp.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GO
CREATE PROCEDURE tSQLt.Private_CleanTestResult
AS
BEGIN
DELETE FROM tSQLt.TestResult;
TRUNCATE TABLE tSQLt.TestResult;
END;
GO
---Build-
Expand Down
2 changes: 1 addition & 1 deletion Source/tSQLt.Private_ResetNewTestClassList.ssp.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CREATE PROCEDURE tSQLt.Private_ResetNewTestClassList
AS
BEGIN
SET NOCOUNT ON;
DELETE FROM tSQLt.Private_NewTestClassList;
TRUNCATE TABLE tSQLt.Private_NewTestClassList;
END;
GO
---Build-
Expand Down
6 changes: 5 additions & 1 deletion Source/tSQLt.UndoTestDoubles.ssp.sql
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ BEGIN


BEGIN TRAN;
DELETE FROM tSQLt.Private_RenamedObjectLog OUTPUT Deleted.* INTO #RenamedObjects;

INSERT INTO #RenamedObjects
SELECT * FROM tSQLt.Private_RenamedObjectLog;

TRUNCATE TABLE tSQLt.Private_RenamedObjectLog;

WITH MarkedTestDoubles AS
(
Expand Down