Skip to content

Commit

Permalink
Fix SRD0024 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cagrin committed Mar 15, 2024
1 parent cdd3902 commit 91dd88b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion latest/SqlCodeAnalysisRules.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<CodeAnalysisRules>-SqlServer.Rules.SRD0013; $(CodeAnalysisRules)</CodeAnalysisRules>
<CodeAnalysisRules>-SqlServer.Rules.SRD0015; $(CodeAnalysisRules)</CodeAnalysisRules>
<CodeAnalysisRules>-SqlServer.Rules.SRD0017; $(CodeAnalysisRules)</CodeAnalysisRules>
<CodeAnalysisRules>-SqlServer.Rules.SRD0024; $(CodeAnalysisRules)</CodeAnalysisRules>
<CodeAnalysisRules>-SqlServer.Rules.SRD0026; $(CodeAnalysisRules)</CodeAnalysisRules>
<CodeAnalysisRules>-SqlServer.Rules.SRD0032; $(CodeAnalysisRules)</CodeAnalysisRules>
<CodeAnalysisRules>-SqlServer.Rules.SRD0043; $(CodeAnalysisRules)</CodeAnalysisRules>
Expand Down
2 changes: 1 addition & 1 deletion latest/tSQLt.Edge/Internal/tSQLt.Internal_ApplyIndex.sql
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BEGIN
'CREATE', @IndexUnique, @IndexType, 'INDEX', @IndexName, 'ON', @ObjectName, @IndexDefinition
)

EXEC (@CreateIndex);
EXEC sys.sp_executesql @CreateIndex;
END
ELSE
BEGIN
Expand Down
2 changes: 1 addition & 1 deletion latest/tSQLt.Edge/Internal/tSQLt.Internal_FakeTable.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BEGIN
DECLARE @NewTableName NVARCHAR(MAX);
EXEC tSQLt.Private_RenameObject @TableName, @NewTableName OUTPUT;

EXEC (@CreateFakeTableCommand);
EXEC sys.sp_executesql @CreateFakeTableCommand;

DECLARE @NewObjectId INT = OBJECT_ID(@TableName);
INSERT INTO tSQLt.Private_FakeTables (ObjectId, ObjectName, FakeObjectId, FakeObjectName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ BEGIN
'ALTER TABLE', @ObjectName, 'ADD CONSTRAINT', @ConstraintName, 'CHECK', @ConstraintDefinition
)

EXEC (@CreateConstraint);
EXEC sys.sp_executesql @CreateConstraint;
END;
GO
4 changes: 2 additions & 2 deletions latest/tSQLt.Edge/Private/tSQLt.Private_ApplyForeignKey.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ BEGIN
'ALTER TABLE', @ObjectName, 'ADD CONSTRAINT', @ConstraintName, 'FOREIGN KEY', @ConstraintDefinition
)

EXEC (@CreateUniqueIndex);
EXEC (@CreateForeignKey);
EXEC sys.sp_executesql @CreateUniqueIndex;
EXEC sys.sp_executesql @CreateForeignKey;
END;
GO
4 changes: 2 additions & 2 deletions latest/tSQLt.Edge/Private/tSQLt.Private_ApplyPrimaryKey.sql
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ BEGIN
'ALTER TABLE', @ObjectName, 'ADD CONSTRAINT', @ConstraintName, 'PRIMARY KEY', @ConstraintDefinition
)

EXEC (@AlterPrimaryColumns);
EXEC (@CreatePrimaryKey);
EXEC sys.sp_executesql @AlterPrimaryColumns;
EXEC sys.sp_executesql @CreatePrimaryKey;
END;
GO
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ BEGIN
'ALTER TABLE', @ObjectName, 'ADD CONSTRAINT', @ConstraintName, 'UNIQUE', @ConstraintDefinition
)

EXEC (@CreateUniqueConstraint);
EXEC sys.sp_executesql @CreateUniqueConstraint;
END;
GO
2 changes: 1 addition & 1 deletion latest/tSQLt.Edge/Private/tSQLt.Private_RenameObject.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ BEGIN
QUOTENAME(@NewName)
);

EXEC (@Command);
EXEC sys.sp_executesql @Command;
END;
GO

0 comments on commit 91dd88b

Please sign in to comment.