Class: OCI8::Metadata::Type

Inherits:
Base show all
Defined in:
lib/oci8/metadata.rb

Overview

Metadata for a type.

This is returned by:

  • OCI8#describe_any(name)

  • OCI8#describe_type(name)

  • OCI8::Metadata::Schema#all_objects

  • OCI8::Metadata::Schema#objects

Instance Method Summary collapse

Methods inherited from Base

#obj_id, #obj_name, #obj_schema, #timestamp

Instance Method Details

#collection_elementObject

returns OCI8::Metadata::Collection if type is collection. nil if otherwise.



833
834
835
# File 'lib/oci8/metadata.rb', line 833

def collection_element
  __param(OCI_ATTR_COLLECTION_ELEMENT) if typecode == :named_collection
end

#collection_typecodeObject

typecode of collection if type is collection. nil if otherwise.



788
789
790
# File 'lib/oci8/metadata.rb', line 788

def collection_typecode
  __typecode(OCI_ATTR_COLLECTION_TYPECODE) if typecode == :named_collection
end

#has_file?Boolean

indicates this type contains a BFILE attribute

Returns:

  • (Boolean)


828
829
830
# File 'lib/oci8/metadata.rb', line 828

def has_file?
  __boolean(OCI_ATTR_HAS_FILE)
end

#has_lob?Boolean

indicates this type contains a LOB attribute

Returns:

  • (Boolean)


823
824
825
# File 'lib/oci8/metadata.rb', line 823

def has_lob?
  __boolean(OCI_ATTR_HAS_LOB)
end

#has_nested_table?Boolean

indicates this type contains a nested table attribute.

Returns:

  • (Boolean)


818
819
820
# File 'lib/oci8/metadata.rb', line 818

def has_nested_table?
  __boolean(OCI_ATTR_HAS_NESTED_TABLE)
end

#inspectObject

:nodoc:



919
920
921
# File 'lib/oci8/metadata.rb', line 919

def inspect # :nodoc:
  "#<#{self.class.name}:(#{obj_id}) #{schema_name}.#{name}>"
end

#is_final_type?Boolean

indicates this is a final type

Returns:

  • (Boolean)


885
886
887
# File 'lib/oci8/metadata.rb', line 885

def is_final_type?
  __boolean(OCI_ATTR_IS_FINAL_TYPE)
end

#is_incomplete_type?Boolean

indicates this is an incomplete type

Returns:

  • (Boolean)


793
794
795
# File 'lib/oci8/metadata.rb', line 793

def is_incomplete_type?
  __boolean(OCI_ATTR_IS_INCOMPLETE_TYPE)
end

#is_instantiable_type?Boolean

indicates this is an instantiable type

Returns:

  • (Boolean)


890
891
892
# File 'lib/oci8/metadata.rb', line 890

def is_instantiable_type?
  __boolean(OCI_ATTR_IS_INSTANTIABLE_TYPE)
end

#is_invoker_rights?Boolean

indicates the type has invoker’s rights

Returns:

  • (Boolean)


870
871
872
# File 'lib/oci8/metadata.rb', line 870

def is_invoker_rights?
  __boolean(OCI_ATTR_IS_INVOKER_RIGHTS)
end

#is_predefined_type?Boolean

indicates this is a predefined type

Returns:

  • (Boolean)


803
804
805
# File 'lib/oci8/metadata.rb', line 803

def is_predefined_type?
  __boolean(OCI_ATTR_IS_PREDEFINED_TYPE)
end

#is_subtype?Boolean

indicates this is a subtype

Returns:

  • (Boolean)


895
896
897
# File 'lib/oci8/metadata.rb', line 895

def is_subtype?
  __boolean(OCI_ATTR_IS_SUBTYPE)
end

#is_system_generated_type?Boolean

indicates this is a system-generated type

Returns:

  • (Boolean)


813
814
815
# File 'lib/oci8/metadata.rb', line 813

def is_system_generated_type?
  __boolean(OCI_ATTR_IS_SYSTEM_GENERATED_TYPE)
end

#is_system_type?Boolean

indicates this is a system type

Returns:

  • (Boolean)


798
799
800
# File 'lib/oci8/metadata.rb', line 798

def is_system_type?
  __boolean(OCI_ATTR_IS_SYSTEM_TYPE)
end

#is_transient_type?Boolean

indicates this is a transient type

Returns:

  • (Boolean)


808
809
810
# File 'lib/oci8/metadata.rb', line 808

def is_transient_type?
  __boolean(OCI_ATTR_IS_TRANSIENT_TYPE)
end

#map_methodObject

map method of type



860
861
862
# File 'lib/oci8/metadata.rb', line 860

def map_method
  __param(OCI_ATTR_MAP_METHOD)
end

#nameObject

type name



875
876
877
# File 'lib/oci8/metadata.rb', line 875

def name
  __text(OCI_ATTR_NAME)
end

#num_type_attrsObject

number of type attributes



838
839
840
# File 'lib/oci8/metadata.rb', line 838

def num_type_attrs
  __ub2(OCI_ATTR_NUM_TYPE_ATTRS)
end

#num_type_methodsObject

number of type methods



849
850
851
# File 'lib/oci8/metadata.rb', line 849

def num_type_methods
  __ub2(OCI_ATTR_NUM_TYPE_METHODS)
end

#order_methodObject

order method of type



865
866
867
# File 'lib/oci8/metadata.rb', line 865

def order_method
  __param(OCI_ATTR_ORDER_METHOD)
end

#schema_nameObject

schema name where the type has been created



880
881
882
# File 'lib/oci8/metadata.rb', line 880

def schema_name
  __text(OCI_ATTR_SCHEMA_NAME)
end

#supertype_nameObject

supertype’s name



905
906
907
# File 'lib/oci8/metadata.rb', line 905

def supertype_name
  __text(OCI_ATTR_SUPERTYPE_NAME) if is_subtype?
end

#supertype_schema_nameObject

supertype’s schema name



900
901
902
# File 'lib/oci8/metadata.rb', line 900

def supertype_schema_name
  __text(OCI_ATTR_SUPERTYPE_SCHEMA_NAME) if is_subtype?
end

#type_attrsObject

array of TypeAttr objects.



910
911
912
# File 'lib/oci8/metadata.rb', line 910

def type_attrs
  @type_attrs ||= list_type_attrs.to_a
end

#type_metadataObject

to type metadata if possible



778
779
780
# File 'lib/oci8/metadata.rb', line 778

def 
  self
end

#type_methodsObject

array of TypeMethod objects.



915
916
917
# File 'lib/oci8/metadata.rb', line 915

def type_methods
  @type_methods ||= list_type_methods.to_a
end

#typecodeObject

typecode. :object or :named_collection



783
784
785
# File 'lib/oci8/metadata.rb', line 783

def typecode
  __typecode(OCI_ATTR_TYPECODE)
end