Sha256: 34ef6b62140eb232ea27f28c06b480b0c6bd45f3af8db3a6b4817f77666e1e87

Contents?: true

Size: 490 Bytes

Versions: 28

Compression:

Stored size: 490 Bytes

Contents

# frozen_string_literal: true

module Torque
  module PostgreSQL
    module InsertAll
      attr_reader :where

      def initialize(*args, where: nil, **xargs)
        super(*args, **xargs)

        @where = where
      end
    end

    module InsertAll::Builder
      delegate :where, to: :insert_all

      def where_condition?
        !where.nil?
      end
    end

    ActiveRecord::InsertAll.prepend InsertAll
    ActiveRecord::InsertAll::Builder.include InsertAll::Builder
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
torque-postgresql-3.4.1 lib/torque/postgresql/insert_all.rb
torque-postgresql-2.4.5 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.4.0 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.3.3 lib/torque/postgresql/insert_all.rb
torque-postgresql-2.4.4 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.3.2 lib/torque/postgresql/insert_all.rb
torque-postgresql-2.4.3 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.3.1 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.3.0 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.2.2 lib/torque/postgresql/insert_all.rb
torque-postgresql-2.4.2 lib/torque/postgresql/insert_all.rb
torque-postgresql-2.4.1 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.2.1 lib/torque/postgresql/insert_all.rb
torque-postgresql-2.4.0 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.2.0 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.1.0 lib/torque/postgresql/insert_all.rb
torque-postgresql-2.3.0 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.0.1 lib/torque/postgresql/insert_all.rb
torque-postgresql-2.2.4 lib/torque/postgresql/insert_all.rb
torque-postgresql-3.0.0 lib/torque/postgresql/insert_all.rb