rspec/rules/S2542/plsql/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

49 lines
738 B
Plaintext

== Why is this an issue?
``++SELECT++`` queries that return too many columns may be complex or difficult to maintain.
This rule identifies queries that ``++SELECT++`` more than the specified number of columns.
=== Noncompliant code example
With a threshold of 6:
[source,sql]
----
BEGIN
SELECT id, name, firstname, gender, height, weight, age -- Noncompliant
INTO peopleArray
FROM people
WHERE age > 60;
END;
/
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Refactor this query to select no more than n columns.
=== Parameters
.maxColumnsCount
****
----
10
----
Maximum number of columns allowed
****
endif::env-github,rspecator-view[]