Sha256: 4e1bb01fb0b9903c5f6c6fb07eee961cf6863647143425931550fe92039255bd
Contents?: true
Size: 604 Bytes
Versions: 12
Compression:
Stored size: 604 Bytes
Contents
# frozen_string_literal: true module ROM module SQL # @api private class Index extend Initializer include Dry::Equalizer(:attributes, :name) param :attributes option :name, optional: true option :unique, default: -> { false } alias_method :unique?, :unique option :type, optional: true option :predicate, optional: true def to_a attributes end def partial? !predicate.nil? end def can_access?(attribute) !partial? && attributes[0].name == attribute.name end end end end
Version data entries
12 entries across 12 versions & 1 rubygems