Skip to content

G-7230 - make clear that constants in package specifications are okay #79

Closed
@PhilippSalvisberg

Description

@PhilippSalvisberg

The bad example in G-7230 uses constants. In this context it is fine to make them private. However there are other constants should be public. Here an example from my related blog post:

CREATE OR REPLACE PACKAGE const_boolean AUTHID DEFINER IS
   co_true  CONSTANT INTEGER := 1;
   co_false CONSTANT INTEGER := 0;
END const_boolean;
/

The guideline should be changed to make clear that this is good.

Furthermore the PL/SQL cop validator should be amended to ignore constant declarations in package specifications.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions