Sha256: 6932b9f825e620f3a448d750a3b939ea0a5e1bb56951fadb8a4e7254fe9d9b79
Contents?: true
Size: 874 Bytes
Versions: 37
Compression:
Stored size: 874 Bytes
Contents
module Flydata module Parser class SourceTable def initialize(table_name, columns = {}) @table_name = table_name @columns = columns @column_names = columns.collect{|k,v| v[:column_name]} @primary_keys = [] # no longer used. keeping the instance variable for # mashall dump compatibility @value_converters = {} end attr_accessor :table_name, :column_names, :value_converters def add_column(column) cn = column[:column_name] @columns[cn] = column @column_names << cn end def set_value_converters(converter_hash) @value_converters ||= {} # for backward compatibility with an old marshal dump object @columns.each_with_index do |(k, v), i| type = v[:format_type] if converter_hash.has_key?(type) @value_converters[i] = converter_hash[type] end end end end end end
Version data entries
37 entries across 37 versions & 1 rubygems