Class: OCI8::Metadata::Subprogram
Overview
Information about PL/SQL subprograms
A PL/SQL subprogram is a named PL/SQL block that can be invoked with a set of parameters. A subprogram can be either a procedure or a function.
This is the abstract base class of OCI8::Metadata::Procedure and OCI8::Metadata::Function.
Instance Method Summary collapse
-
#arguments ⇒ array of OCI8::Metadata::Argument
Returns argument information of the subprogram.
-
#is_invoker_rights? ⇒ Boolean
Returns
true
if the subprogram has invoker’s rights. -
#is_standalone? ⇒ Boolean
Returns
true
if the subprogram is standalone,false
if packaged. -
#obj_id ⇒ Object
:nodoc:.
-
#obj_name ⇒ Object
(also: #name)
:nodoc:.
-
#obj_schema ⇒ Object
:nodoc:.
-
#overload_id ⇒ Integer or nil
Returns
nil
for a standalone stored subprogram, positive integer for an overloaded packaged subprogram, otherwise zero.
Methods inherited from Base
Instance Method Details
#arguments ⇒ array of OCI8::Metadata::Argument
Returns argument information of the subprogram. If it is a function, the first array element is information of its return type.
590 591 592 |
# File 'lib/oci8/metadata.rb', line 590 def arguments @arguments ||= list_arguments.to_a end |
#is_invoker_rights? ⇒ Boolean
Returns true
if the subprogram has invoker’s rights. Otherwise, false
.
563 564 565 |
# File 'lib/oci8/metadata.rb', line 563 def is_invoker_rights? attr_get_ub1(OCI_ATTR_IS_INVOKER_RIGHTS) != 0 end |
#is_standalone? ⇒ Boolean
Returns true
if the subprogram is standalone, false
if packaged.
596 597 598 599 |
# File 'lib/oci8/metadata.rb', line 596 def is_standalone? @is_standalone = true unless defined? @is_standalone @is_standalone end |
#obj_id ⇒ Object
:nodoc:
548 549 550 |
# File 'lib/oci8/metadata.rb', line 548 def obj_id # :nodoc: super if is_standalone? end |
#obj_name ⇒ Object Also known as: name
:nodoc:
552 553 554 |
# File 'lib/oci8/metadata.rb', line 552 def obj_name # :nodoc: is_standalone? ? super : attr_get_string(OCI_ATTR_NAME) end |
#obj_schema ⇒ Object
:nodoc:
556 557 558 |
# File 'lib/oci8/metadata.rb', line 556 def obj_schema # :nodoc: super if is_standalone? end |
#overload_id ⇒ Integer or nil
Returns nil
for a standalone stored subprogram, positive integer for an overloaded packaged subprogram, otherwise zero.
582 583 584 |
# File 'lib/oci8/metadata.rb', line 582 def overload_id attr_get_ub2(OCI_ATTR_OVERLOAD_ID) unless is_standalone? end |