lib/pg_histogram/histogram.rb
# executes the query and converts bucket numbers to minimum step in bucket
executes the query and converts bucket numbers to minimum step in bucket
executes the query and converts bucket numbers to minimum step in bucket
def labeled_histogram
      query_for_buckets.each_with_object({}) do |row, results|
        results[bucket_num_to_label(row[BUCKET_COL].to_i)] = row[FREQUENCY_COL].to_i \
          unless row[BUCKET_COL].nil?
      end
    end
def labeled_histogram query_for_buckets . each_with_object ( { } ) do | row , results | results [ bucket_num_to_label ( row [ BUCKET_COL ] . to_i ) ] = row [ FREQUENCY_COL ] . to_i unless row [ BUCKET_COL ] . nil? end end
executes the query and converts bucket numbers to minimum step in bucket
executes the query and converts bucket numbers to minimum step in bucket