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 ⇒ Object
call-seq: arguments -> list of argument information.
-
#inspect ⇒ Object
:nodoc:.
-
#is_invoker_rights? ⇒ Boolean
call-seq: is_invoker_rights? -> true or false.
-
#is_standalone? ⇒ Boolean
call-seq: is_standalone? -> true or false.
-
#obj_id ⇒ Object
:nodoc:.
-
#obj_name ⇒ Object
(also: #name)
:nodoc:.
-
#obj_schema ⇒ Object
:nodoc:.
-
#overload_id ⇒ Object
call-seq: overload_id -> integer or nil.
Instance Method Details
#arguments ⇒ Object
call-seq:
arguments -> list of argument information
Returns an array of OCI8::Metadata::Argument of the subprogram. If it is a function, the first array element is information of its return type.
612 613 614 |
# File 'lib/oci8/metadata.rb', line 612 def arguments @arguments ||= list_arguments.to_a end |
#inspect ⇒ Object
:nodoc:
626 627 628 |
# File 'lib/oci8/metadata.rb', line 626 def inspect # :nodoc: "#<#{self.class.name}: #{name}>" end |
#is_invoker_rights? ⇒ Boolean
call-seq:
is_invoker_rights? -> true or false
Returns true
if the subprogram has invoker’s rights. Otherwise, false
.
583 584 585 |
# File 'lib/oci8/metadata.rb', line 583 def is_invoker_rights? attr_get_ub1(OCI_ATTR_IS_INVOKER_RIGHTS) != 0 end |
#is_standalone? ⇒ Boolean
call-seq:
is_standalone? -> true or false
Returns true
if the subprogram is standalone, false
if packaged.
621 622 623 624 |
# File 'lib/oci8/metadata.rb', line 621 def is_standalone? @is_standalone = true unless defined? @is_standalone @is_standalone end |
#obj_id ⇒ Object
:nodoc:
565 566 567 |
# File 'lib/oci8/metadata.rb', line 565 def obj_id # :nodoc: super if is_standalone? end |
#obj_name ⇒ Object Also known as: name
:nodoc:
569 570 571 |
# File 'lib/oci8/metadata.rb', line 569 def obj_name # :nodoc: is_standalone? ? super : attr_get_string(OCI_ATTR_NAME) end |
#obj_schema ⇒ Object
:nodoc:
573 574 575 |
# File 'lib/oci8/metadata.rb', line 573 def obj_schema # :nodoc: super if is_standalone? end |
#overload_id ⇒ Object
call-seq:
overload_id -> integer or nil
Returns nil
for a standalone stored subprogram, positive integer for a overloaded packaged subprogram. , otherwise zero.
603 604 605 |
# File 'lib/oci8/metadata.rb', line 603 def overload_id attr_get_ub2(OCI_ATTR_OVERLOAD_ID) unless is_standalone? end |