Module: DbMeta

Defined in:
lib/db_meta.rb,
lib/db_meta/version.rb,
lib/db_meta/abstract.rb,
lib/db_meta/constant.rb,
lib/db_meta/oracle/base.rb,
lib/db_meta/oracle/helper.rb,
lib/db_meta/oracle/oracle.rb,
lib/db_meta/oracle/objects.rb,
lib/db_meta/oracle/types/job.rb,
lib/db_meta/oracle/types/lob.rb,
lib/db_meta/oracle/connection.rb,
lib/db_meta/oracle/types/type.rb,
lib/db_meta/oracle/types/view.rb,
lib/db_meta/oracle/types/grant.rb,
lib/db_meta/oracle/types/index.rb,
lib/db_meta/oracle/types/queue.rb,
lib/db_meta/oracle/types/table.rb,
lib/db_meta/oracle/types/column.rb,
lib/db_meta/oracle/types/comment.rb,
lib/db_meta/oracle/types/package.rb,
lib/db_meta/oracle/types/synonym.rb,
lib/db_meta/oracle/types/trigger.rb,
lib/db_meta/oracle/types/function.rb,
lib/db_meta/oracle/types/sequence.rb,
lib/db_meta/oracle/types/procedure.rb,
lib/db_meta/oracle/types/type_body.rb,
lib/db_meta/oracle/types/constraint.rb,
lib/db_meta/oracle/types/package_body.rb,
lib/db_meta/oracle/types/database_link.rb,
lib/db_meta/oracle/types/grant_collection.rb,
lib/db_meta/oracle/types/materialized_view.rb,
lib/db_meta/oracle/types/synonym_collection.rb,
lib/db_meta/oracle/types/constraint_collection.rb,
lib/db_meta/oracle/types/table_data_collection.rb

Defined Under Namespace

Modules: Oracle Classes: Abstract, DbMeta

Constant Summary collapse

DATABASE_TYPES =
[:oracle]
VERSION =
"0.12.0"
SUMMARY_COLUMN_FORMAT_NAME =
"%-40s"
SUMMARY_COLUMN_FORMAT_NAME_RIGHT =
"%40s"
TYPE_SEQUENCE =
{
  "SUMMARY" => 0,
  "CREATE" => 1,
  "DROP" => 1,

  "DATABASE LINK" => 2,
  "SEQUENCE" => 3,
  "TYPE" => 4,
  "TABLE" => 5,
  "QUEUE" => 6,
  "LOB" => 7,
  "VIEW" => 8,
  "MATERIALIZED VIEW" => 9,
  "FUNCTION" => 10,
  "PROCEDURE" => 11,
  "PACKAGE" => 12,
  "PACKAGE BODY" => 12.1,
  "SYNONYM" => 13,
  "TRIGGER" => 14,
  "GRANT" => 15,
  "GRANT EXTERNAL" => 16,
  "INDEX" => 17,
  "DATA" => 20,
  "CONSTRAINT" => 30
}
EXTRACT_FORMATS =
[:sql]
OBJECT_QUERY =
"
  select * from (
    select OBJECT_TYPE, OBJECT_NAME, STATUS from user_objects
    union all
    select 'CONSTRAINT' as OBJECT_TYPE, CONSTRAINT_NAME as OBJECT_NAME, STATUS from user_constraints
    union all
    select 'GRANT' as OBJECT_TYPE, grantee || ',' || owner || ',' || table_name || ',' || grantor || ',' || privilege || ',' || grantable as object_name, 'VALID' as status from user_tab_privs
  ) order by object_type, object_name
"
OBJECT_FILTER =
["LOB", "PACKAGE BODY", "CONSTRAINT", "GRANT"]