Kiss A simpler, smarter web application framework for Ruby

Sequel::MySQL::Dataset Subclass of Sequel::Dataset

Public Instance Methods

all_arrays(opts = nil, &block) source

Returns results from dataset query as array of arrays, instead of array of hashes.

    # File lib/kiss/sequel_mysql.rb, line 6
      def all_arrays(opts = nil, &block)
        a = []
        fetch_arrays(select_sql(opts)) {|r| a << r}
        a.each(&block) if block
        a
      end
    
fetch_arrays(sql) {|row| ...} source

Fixes bug in Sequel 1.5; shouldn’t be needed for Sequel 2.x (need to double-check, however).

    # File lib/kiss/sequel_mysql.rb, line 15
      def fetch_arrays(sql)
        execute(sql) do |r|
          while row = r.fetch_row
            yield row
          end
        end
        self
      end
    

Disabled; run with $DEBUG to generate this.