
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.
32 lines
549 B
Plaintext
32 lines
549 B
Plaintext
include::description.adoc[]
|
|
|
|
include::ask-yourself.adoc[]
|
|
|
|
include::recommended.adoc[]
|
|
|
|
== Sensitive Code Example
|
|
|
|
----
|
|
SELECT * FROM db_persons INTO us_persons.
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
[source,text]
|
|
----
|
|
SELECT * FROM db_persons INTO us_persons WHERE country IS 'US'.
|
|
----
|
|
|
|
|
|
== Exceptions
|
|
|
|
``++SELECT SINGLE++`` and ``++UP TO 1 ROWS++`` result in only one record being read, so such ``++SELECT++``s are ignored by this rule.
|
|
|
|
----
|
|
SELECT SINGLE * FROM db_persons INTO us_persons.
|
|
|
|
SELECT * FROM db_persons UP TO 1 ROWS INTO us_persons.
|
|
----
|
|
|