rspec/rules/S1192/plsql/rule.adoc

49 lines
693 B
Plaintext
Raw Normal View History

2023-10-11 11:41:24 +02:00
include::../rule.adoc[]
2023-10-11 11:41:24 +02:00
=== Code examples
2020-06-30 12:47:33 +02:00
2023-10-11 11:41:24 +02:00
==== Noncompliant code example
2020-06-30 12:47:33 +02:00
With the default threshold of 3:
2023-10-11 11:41:24 +02:00
[source,sql,diff-id=1,diff-type=noncompliant]
2020-06-30 12:47:33 +02:00
----
BEGIN
prepare('action1');
execute('action1');
release('action1');
END;
/
----
2023-10-11 11:41:24 +02:00
==== Compliant solution
2020-06-30 12:47:33 +02:00
2023-10-11 11:41:24 +02:00
[source,sql,diff-id=1,diff-type=compliant]
2020-06-30 12:47:33 +02:00
----
DECLARE
2023-10-11 11:41:24 +02:00
co_action CONSTANT VARCHAR2(7) := 'action1';
2020-06-30 12:47:33 +02:00
BEGIN
2023-10-11 11:41:24 +02:00
prepare(co_action);
execute(co_action);
release(co_action);
2020-06-30 12:47:33 +02:00
END;
/
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
include::../highlighting.adoc[]
'''
endif::env-github,rspecator-view[]