Sha256: 51ee81e251411f4c9612691aad0b3013663179bed31e8bd8ed53fa6de034b8e5

Contents?: true

Size: 322 Bytes

Versions: 2

Compression:

Stored size: 322 Bytes

Contents

class ActiveRecord::ConnectionAdapters::NullDBAdapter

  class EmptyResult < Array
    attr_writer :columns
    def rows
      []
    end

    def column_types
      columns.map{|col| col.type}
    end

    def columns
      @columns ||= []
    end

    def cast_values(type_overrides = nil)
      rows
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-nulldb-adapter-0.3.6 lib/active_record/connection_adapters/nulldb_adapter/empty_result.rb
activerecord-nulldb-adapter-0.3.5 lib/active_record/connection_adapters/nulldb_adapter/empty_result.rb