Module: ActiveRecord::ConnectionAdapters::HiveAdapter::TableDefinitionExtensions

Defined in:
lib/active_record/connection_adapters/hive_adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#partitionsObject (readonly)

Returns the value of attribute partitions.



49
50
51
# File 'lib/active_record/connection_adapters/hive_adapter.rb', line 49

def partitions
  @partitions
end

Instance Method Details

#externalObject



61
62
63
# File 'lib/active_record/connection_adapters/hive_adapter.rb', line 61

def external
  true
end

#partition(name, type, options = { }) ⇒ Object



51
52
53
54
55
# File 'lib/active_record/connection_adapters/hive_adapter.rb', line 51

def partition(name, type, options={ })
  column(name, type, options)
  @partitions = [] unless @partitions
  @partitions << @columns.pop
end

#row_formatObject



57
58
59
# File 'lib/active_record/connection_adapters/hive_adapter.rb', line 57

def row_format
  'ROW FORMAT DELIMITED FIELDS TERMINATED BY "\t"'
end