class ActiveRecord::ConnectionAdapters::Hanaclient::TableDefinition

Attributes

as[R]
comment[R]
foreign_keys[R]
indexes[RW]
name[R]
options[R]
row_table[R]
temporary[R]

Public Class Methods

new(name, temporary = false, row_table = false, options = nil, as = nil, comment: nil) click to toggle source
# File lib/active_record/connection_adapters/hanaclient/schema_definitions.rb, line 42
def initialize(name, temporary = false, row_table = false, options = nil, as = nil, comment: nil)
  @columns_hash = {}
  @indexes = []
  @foreign_keys = []
  @primary_keys = nil
  @row_table = row_table
  @temporary = temporary
  @options = options
  @as = as
  @name = name
  @comment = comment
end

Public Instance Methods

new_column_definition(name, type, **options) click to toggle source
Calls superclass method
# File lib/active_record/connection_adapters/hanaclient/schema_definitions.rb, line 56
def new_column_definition(name, type, **options)
  if type == :primary_key
    type = :integer
    options[:limit] ||= 8
    options[:auto_increment] = true
    options[:primary_key] = true
  end
  super
end