49 lines
693 B
Plaintext
49 lines
693 B
Plaintext
include::../rule.adoc[]
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
With the default threshold of 3:
|
|
|
|
[source,sql,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
BEGIN
|
|
prepare('action1');
|
|
execute('action1');
|
|
release('action1');
|
|
END;
|
|
/
|
|
----
|
|
|
|
==== Compliant solution
|
|
|
|
[source,sql,diff-id=1,diff-type=compliant]
|
|
----
|
|
DECLARE
|
|
co_action CONSTANT VARCHAR2(7) := 'action1';
|
|
BEGIN
|
|
prepare(co_action);
|
|
execute(co_action);
|
|
release(co_action);
|
|
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[]
|