Class: OCI8::Metadata::Table

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

Overview

Metadata for a table.

This is returned by:

  • OCI8#describe_any(name)

  • OCI8#describe_table(name)

  • OCI8::Metadata::Schema#all_objects

  • OCI8::Metadata::Schema#objects

See also:

  • OCI8::Metadata::Base#obj_name

  • OCI8::Metadata::Base#obj_schema

Instance Method Summary collapse

Methods inherited from Base

#inspect, #obj_id, #obj_name, #obj_schema, #timestamp

Instance Method Details

#clustered?Boolean

indicates the table is clustered.

Returns:

  • (Boolean)


583
584
585
# File 'lib/oci8/metadata.rb', line 583

def clustered?
  __boolean(OCI_ATTR_CLUSTERED)
end

#columnsObject

array of Column objects in a table.



598
599
600
# File 'lib/oci8/metadata.rb', line 598

def columns
  @columns ||= list_columns.to_a
end

#dbaObject

data block address of the segment header. (How to use this?)



573
574
575
# File 'lib/oci8/metadata.rb', line 573

def dba
  __ub4(OCI_ATTR_RDBA)
end

#durationObject

Duration of a temporary table. Values can be :session or :transaction. nil if not a temporary table.



566
567
568
# File 'lib/oci8/metadata.rb', line 566

def duration
  __duration
end

#index_only?Boolean

indicates the table is index-only.

Returns:

  • (Boolean)


593
594
595
# File 'lib/oci8/metadata.rb', line 593

def index_only?
  __boolean(OCI_ATTR_INDEX_ONLY)
end

#is_temporary?Boolean

indicates the table is temporary.

Returns:

  • (Boolean)


555
556
557
# File 'lib/oci8/metadata.rb', line 555

def is_temporary?
  __boolean(OCI_ATTR_IS_TEMPORARY)
end

#is_typed?Boolean

indicates the table is typed.

Returns:

  • (Boolean)


560
561
562
# File 'lib/oci8/metadata.rb', line 560

def is_typed?
  __boolean(OCI_ATTR_IS_TYPED)
end

#num_colsObject

number of columns



539
540
541
# File 'lib/oci8/metadata.rb', line 539

def num_cols
  __ub2(OCI_ATTR_NUM_COLS)
end

#partitioned?Boolean

indicates the table is partitioned.

Returns:

  • (Boolean)


588
589
590
# File 'lib/oci8/metadata.rb', line 588

def partitioned?
  __boolean(OCI_ATTR_PARTITIONED)
end

#tablespaceObject

tablespace the table resides in. (How to use this?)



578
579
580
# File 'lib/oci8/metadata.rb', line 578

def tablespace
  __word(OCI_ATTR_TABLESPACE)
end

#type_metadataObject

to type metadata if possible



550
551
552
# File 'lib/oci8/metadata.rb', line 550

def 
  (OCI8::Metadata::Type)
end