Module: DataMapper::Migrations::OracleAdapter::ClassMethods

### Home Classes Methods

### In Files

- lib/dm-migrations/adapters/dm-oracle-adapter.rb

### Methods

- #auto_migrate_reset_sequences
- #auto_migrate_with
- #type_map

### Files

- LICENSE
- README.rdoc

### Class/Module Index

Quicksearch

- DataMapper
- DataMapper::Adapters
- DataMapper::Migration
- DataMapper::MigrationRunner
- DataMapper::Migrations
- DataMapper::Migrations::DataObjectsAdapter
- DataMapper::Migrations::DataObjectsAdapter::ClassMethods
- DataMapper::Migrations::DuplicateMigration
- DataMapper::Migrations::Model
- DataMapper::Migrations::MysqlAdapter
- DataMapper::Migrations::MysqlAdapter::ClassMethods
- DataMapper::Migrations::OracleAdapter
- DataMapper::Migrations::OracleAdapter::ClassMethods
- DataMapper::Migrations::PostgresAdapter
- DataMapper::Migrations::PostgresAdapter::ClassMethods
- DataMapper::Migrations::Repository
- DataMapper::Migrations::SingletonMethods
- DataMapper::Migrations::SqliteAdapter
- DataMapper::Migrations::SqliteAdapter::ClassMethods
- DataMapper::Migrations::SqlserverAdapter
- DataMapper::Migrations::SqlserverAdapter::ClassMethods
- DataMapper::Migrations::YamlAdapter
- SQL
- SQL::Column
- SQL::Mysql
- SQL::Mysql::Column
- SQL::Mysql::Table
- SQL::Postgres
- SQL::Postgres::Column
- SQL::Postgres::Table
- SQL::Sqlite
- SQL::Sqlite::Column
- SQL::Sqlite::Table
- SQL::Table
- SQL::TableCreator
- SQL::TableCreator::Column
- SQL::TableCreator::SqlExpr
- SQL::TableModifier
- Spec
- Spec::Example
- Spec::Example::MigrationExampleGroup
- Spec::Matchers
- Spec::Matchers::Migration
- Spec::Matchers::Migration::HaveColumnMatcher
- Spec::Matchers::Migration::HaveTableMatcher
- Spec::Matchers::Migration::NullableColumnMatcher
- Spec::Matchers::Migration::PrimaryKeyMatcher
- Object

No matching classes.

# DataMapper::Migrations::OracleAdapter::ClassMethods

### Public Instance Methods

auto_migrate_reset_sequences(value = :not_specified) click to toggle source

Set if sequences will or will not be reset during auto_migrate!

@param [TrueClass, FalseClass] reset sequences?

    do not specify parameter to return current value

@return [Symbol] current value of auto_migrate_reset_sequences option (default value is true)

@api semipublic

    # File lib/dm-migrations/adapters/dm-oracle-adapter.rb, line 322
    def auto_migrate_reset_sequences(value = :not_specified)
      return @auto_migrate_reset_sequences.nil? ? true : @auto_migrate_reset_sequences if value == :not_specified
      raise ArgumentError unless [true, false].include?(value)
      @auto_migrate_reset_sequences = value
    end

auto_migrate_with(value = :not_specified) click to toggle source

Use table truncate or delete for auto_migrate! to speed up test execution

@param [Symbol] :truncate, :delete or :drop_and_create (or nil)

    do not specify parameter to return current value

@return [Symbol] current value of auto_migrate_with option (nil returned for :drop_and_create)

@api semipublic

    # File lib/dm-migrations/adapters/dm-oracle-adapter.rb, line 307
    def auto_migrate_with(value = :not_specified)
      return @auto_migrate_with if value == :not_specified
      value = nil if value == :drop_and_create
      raise ArgumentError unless [nil, :truncate, :delete].include?(value)
      @auto_migrate_with = value
    end

type_map() click to toggle source

Types for Oracle databases.

@return [Hash] types for Oracle databases.

@api private

    # File lib/dm-migrations/adapters/dm-oracle-adapter.rb, line 280
    def type_map
      length    = Property::String.length
      precision = Property::Numeric.precision
      scale     = Property::Decimal.scale

      {
        Integer        => { :primitive => 'NUMBER',   :precision => precision, :scale => 0   },
        String         => { :primitive => 'VARCHAR2', :length => length                      },
        Class          => { :primitive => 'VARCHAR2', :length => length                      },
        BigDecimal     => { :primitive => 'NUMBER',   :precision => precision, :scale => nil },
        Float          => { :primitive => 'BINARY_FLOAT',                                    },
        DateTime       => { :primitive => 'DATE'                                             },
        Date           => { :primitive => 'DATE'                                             },
        Time           => { :primitive => 'DATE'                                             },
        TrueClass      => { :primitive => 'NUMBER',  :precision => 1, :scale => 0            },
        Property::Text => { :primitive => 'CLOB'                                             },
      }.freeze
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.