Class: Oraora::Meta::Subprogram
- Inherits:
-
Object
- Object
- Oraora::Meta::Subprogram
- Defined in:
- lib/oraora/meta/subprogram.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#package ⇒ Object
readonly
Returns the value of attribute package.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Class Method Summary collapse
Instance Method Summary collapse
- #describe(options = {}) ⇒ Object
-
#initialize(schema, package, name) ⇒ Subprogram
constructor
A new instance of Subprogram.
- #list(options = {}, filter = nil) ⇒ Object
- #load_from_oci(oci) ⇒ Object
Constructor Details
#initialize(schema, package, name) ⇒ Subprogram
Returns a new instance of Subprogram.
6 7 8 9 10 |
# File 'lib/oraora/meta/subprogram.rb', line 6 def initialize(schema, package, name) @schema = schema @package = package @name = name end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/oraora/meta/subprogram.rb', line 4 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/oraora/meta/subprogram.rb', line 4 def name @name end |
#package ⇒ Object (readonly)
Returns the value of attribute package.
4 5 6 |
# File 'lib/oraora/meta/subprogram.rb', line 4 def package @package end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
4 5 6 |
# File 'lib/oraora/meta/subprogram.rb', line 4 def schema @schema end |
Class Method Details
.from_oci(oci, schema, package, name) ⇒ Object
18 19 20 |
# File 'lib/oraora/meta/subprogram.rb', line 18 def self.from_oci(oci, schema, package, name) new(schema, package, name).load_from_oci(oci) end |
Instance Method Details
#describe(options = {}) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/oraora/meta/subprogram.rb', line 22 def describe( = {}) " Schema: \#{@schema}\n Package: \#{@package}\n Name: \#{@name}\n Id: \#{@id}\n HERE\nend\n".reset_indentation |
#list(options = {}, filter = nil) ⇒ Object
31 32 33 |
# File 'lib/oraora/meta/subprogram.rb', line 31 def list( = {}, filter = nil) raise NotApplicable, "Nothing to list for subprogram" end |
#load_from_oci(oci) ⇒ Object
12 13 14 15 16 |
# File 'lib/oraora/meta/subprogram.rb', line 12 def load_from_oci(oci) @id = oci.select_one("SELECT subprogram_id FROM all_procedues WHERE owner = :schema AND object_name = :package AND procedure_name = :name", @schema, @package, @name) self end |