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
322:         def auto_migrate_reset_sequences(value = :not_specified)
323:           return @auto_migrate_reset_sequences.nil? ? true : @auto_migrate_reset_sequences if value == :not_specified
324:           raise ArgumentError unless [true, false].include?(value)
325:           @auto_migrate_reset_sequences = value
326:         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
307:         def auto_migrate_with(value = :not_specified)
308:           return @auto_migrate_with if value == :not_specified
309:           value = nil if value == :drop_and_create
310:           raise ArgumentError unless [nil, :truncate, :delete].include?(value)
311:           @auto_migrate_with = value
312:         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
280:         def type_map
281:           length    = Property::String.length
282:           precision = Property::Numeric.precision
283:           scale     = Property::Decimal.scale
284: 
285:           {
286:             Integer        => { :primitive => 'NUMBER',   :precision => precision, :scale => 0   },
287:             String         => { :primitive => 'VARCHAR2', :length => length                      },
288:             Class          => { :primitive => 'VARCHAR2', :length => length                      },
289:             BigDecimal     => { :primitive => 'NUMBER',   :precision => precision, :scale => nil },
290:             Float          => { :primitive => 'BINARY_FLOAT',                                    },
291:             DateTime       => { :primitive => 'DATE'                                             },
292:             Date           => { :primitive => 'DATE'                                             },
293:             Time           => { :primitive => 'DATE'                                             },
294:             TrueClass      => { :primitive => 'NUMBER',  :precision => 1, :scale => 0            },
295:             Property::Text => { :primitive => 'CLOB'                                             },
296:           }.freeze
297:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.