Sha256: 0780cbc9f3d026a96f558076c23ffb5037f424c91f87a03ced0d93c31926b80f

Contents?: true

Size: 944 Bytes

Versions: 1

Compression:

Stored size: 944 Bytes

Contents

class Sequel::Dataset
  # This module should be included in the dataset class for all databases that
  # don't support INTERSECT or EXCEPT.
  module UnsupportedIntersectExcept
    # Raise an Error if EXCEPT is used
    def except(ds, all=false)
      raise(Sequel::Error, "EXCEPT not supported")
    end

    # Raise an Error if INTERSECT is used
    def intersect(ds, all=false)
      raise(Sequel::Error, "INTERSECT not supported")
    end
  end

  # This module should be included in the dataset class for all databases that
  # don't support INTERSECT ALL or EXCEPT ALL.
  module UnsupportedIntersectExceptAll
    # Raise an Error if EXCEPT is used
    def except(ds, all=false)
      raise(Sequel::Error, "EXCEPT ALL not supported") if all
      super(ds)
    end

    # Raise an Error if INTERSECT is used
    def intersect(ds, all=false)
      raise(Sequel::Error, "INTERSECT ALL not supported") if all
      super(ds)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sequel-2.8.0 lib/sequel_core/dataset/unsupported.rb