
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.
49 lines
738 B
Plaintext
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[]
|