18 lines
438 B
C#
18 lines
438 B
C#
using Microsoft.SqlServer.TransactSql.ScriptDom;
|
|
using SQLLinter.Common;
|
|
|
|
namespace SQLLinter.Infrastructure.Rules;
|
|
|
|
public class WhereInSelectRule : BaseRuleVisitor
|
|
{
|
|
public override string Text => "Запрещено IN (SELECT ...), используйте EXISTS/NOT EXISTS.";
|
|
|
|
public override void Visit(InPredicate node)
|
|
{
|
|
if (node.Subquery != null)
|
|
{
|
|
AddViolation(node);
|
|
}
|
|
}
|
|
}
|