def db_type
      # first, detect any character not number
      case
      when @data.any? { |v| v.to_s =~ DATE_REGEXP }
        'DATE'
      when @data.any? { |v| v.to_s =~ /[^0-9e.-]/ }
        'VARCHAR (255)'
      when @data.any? { |v| v.to_s =~ /\./ }
        'DOUBLE'
      else
        'INTEGER'
      end
    end
def db_type
      # first, detect any character not number
      case
      when @data.any? { |v| v.to_s =~ DATE_REGEXP }
        'DATE'
      when @data.any? { |v| v.to_s =~ /[^0-9e.-]/ }
        'VARCHAR (255)'
      when @data.any? { |v| v.to_s =~ /\./ }
        'DOUBLE'
      else
        'INTEGER'
      end
    end
def db_type # first, detect any character not number case when @data . any? { | v | v . to_s =~ DATE_REGEXP } 'DATE' when @data . any? { | v | v . to_s =~ / / } 'VARCHAR (255)' when @data . any? { | v | v . to_s =~ / \. / } 'DOUBLE' else 'INTEGER' end end
Returns the database type for the vector, according to its content
Returns the database type for the vector according to its content