11module PLSQL
2- module ProcedureClassMethods #:nodoc:
2+ module ProcedureClassMethods # :nodoc:
33 def find ( schema , procedure , package = nil , override_schema_name = nil )
44 if package . nil?
55 if ( row = schema . select_first (
@@ -53,12 +53,12 @@ def procedure_object_id_src(schema)
5353 end
5454 end
5555
56- module ProcedureCommon #:nodoc:
56+ module ProcedureCommon # :nodoc:
5757 attr_reader :arguments , :argument_list , :out_list , :return
5858 attr_reader :schema , :schema_name , :package , :procedure
5959
6060 # return type string from metadata that can be used in DECLARE block or table definition
61- def self . type_to_sql ( metadata ) #:nodoc:
61+ def self . type_to_sql ( metadata ) # :nodoc:
6262 case metadata [ :data_type ]
6363 when "NUMBER"
6464 precision , scale = metadata [ :data_precision ] , metadata [ :data_scale ]
@@ -82,15 +82,15 @@ def self.type_to_sql(metadata) #:nodoc:
8282 end
8383
8484 # get procedure argument metadata from data dictionary
85- def get_argument_metadata #:nodoc:
85+ def get_argument_metadata # :nodoc:
8686 if ( @schema . connection . database_version <=> [ 18 , 0 , 0 , 0 ] ) >= 0
8787 get_argument_metadata_from_18c
8888 else
8989 get_argument_metadata_below_18c
9090 end
9191 end
9292
93- def get_argument_metadata_below_18c #:nodoc:
93+ def get_argument_metadata_below_18c # :nodoc:
9494 @arguments = { }
9595 @argument_list = { }
9696 @out_list = { }
@@ -209,7 +209,7 @@ def get_argument_metadata_below_18c #:nodoc:
209209 end
210210
211211 # get procedure argument metadata from data dictionary
212- def get_argument_metadata_from_18c #:nodoc:
212+ def get_argument_metadata_from_18c # :nodoc:
213213 @arguments = { }
214214 @argument_list = { }
215215 @out_list = { }
@@ -304,15 +304,15 @@ def get_argument_metadata_from_18c #:nodoc:
304304 construct_argument_list_for_overloads
305305 end
306306
307- def construct_argument_list_for_overloads #:nodoc:
307+ def construct_argument_list_for_overloads # :nodoc:
308308 @overloads = @arguments . keys . sort
309309 @overloads . each do |overload |
310310 @argument_list [ overload ] = @arguments [ overload ] . keys . sort { |k1 , k2 | @arguments [ overload ] [ k1 ] [ :position ] <=> @arguments [ overload ] [ k2 ] [ :position ] }
311311 @out_list [ overload ] = @argument_list [ overload ] . select { |k | @arguments [ overload ] [ k ] [ :in_out ] =~ /OUT/ }
312312 end
313313 end
314314
315- def ensure_tmp_tables_created ( overload ) #:nodoc:
315+ def ensure_tmp_tables_created ( overload ) # :nodoc:
316316 return if @tmp_tables_created . nil? || @tmp_tables_created [ overload ]
317317 @tmp_table_names [ overload ] && @tmp_table_names [ overload ] . each do |table_name , argument_metadata |
318318 sql = "CREATE GLOBAL TEMPORARY TABLE #{ table_name } (\n "
@@ -336,7 +336,7 @@ def ensure_tmp_tables_created(overload) #:nodoc:
336336 @tmp_tables_created [ overload ] = true
337337 end
338338
339- def build_sql_type_name ( type_owner , type_package , type_name ) #:nodoc:
339+ def build_sql_type_name ( type_owner , type_package , type_name ) # :nodoc:
340340 if type_owner == nil || type_owner == "PUBLIC"
341341 type_owner_res = ""
342342 else
@@ -351,7 +351,7 @@ def build_sql_type_name(type_owner, type_package, type_name) #:nodoc:
351351 type_name_res && "#{ type_owner_res } #{ type_name_res } "
352352 end
353353
354- def get_field_definitions ( argument_metadata ) #:nodoc:
354+ def get_field_definitions ( argument_metadata ) # :nodoc:
355355 fields = { }
356356 case argument_metadata [ :type_object_type ]
357357 when "PACKAGE"
@@ -414,7 +414,7 @@ def get_field_definitions(argument_metadata) #:nodoc:
414414 fields
415415 end
416416
417- def get_element_definition ( argument_metadata ) #:nodoc:
417+ def get_element_definition ( argument_metadata ) # :nodoc:
418418 element_metadata = { }
419419 if collection_type? ( argument_metadata [ :data_type ] )
420420 case argument_metadata [ :type_object_type ]
@@ -516,21 +516,21 @@ def get_composite_type(type_owner, type_name, type_package)
516516 end
517517
518518 PLSQL_COMPOSITE_TYPES = [ "PL/SQL RECORD" , "PL/SQL TABLE" , "TABLE" , "VARRAY" , "REF CURSOR" ] . freeze
519- def composite_type? ( data_type ) #:nodoc:
519+ def composite_type? ( data_type ) # :nodoc:
520520 PLSQL_COMPOSITE_TYPES . include? data_type
521521 end
522522
523523 PLSQL_COLLECTION_TYPES = [ "PL/SQL TABLE" , "TABLE" , "VARRAY" ] . freeze
524- def collection_type? ( data_type ) #:nodoc:
524+ def collection_type? ( data_type ) # :nodoc:
525525 PLSQL_COLLECTION_TYPES . include? data_type
526526 end
527527
528- def overloaded? #:nodoc:
528+ def overloaded? # :nodoc:
529529 @overloaded
530530 end
531531 end
532532
533- class Procedure #:nodoc:
533+ class Procedure # :nodoc:
534534 extend ProcedureClassMethods
535535 include ProcedureCommon
536536
0 commit comments