require 'dry-equalizer' require 'rom/support/constants' require 'rom/schema/dsl' require 'rom/association_set' module ROM # Relation schema # # @api public class Schema EMPTY_ASSOCIATION_SET = AssociationSet.new(EMPTY_HASH).freeze include Dry::Equalizer(:name, :attributes, :associations) include Enumerable # @!attribute [r] name # @return [Symbol] The name of this schema attr_reader :name # @!attribute [r] attributes # @return [Hash] The hash with schema attribute types attr_reader :attributes # @!attribute [r] associations # @return [AssociationSet] Optional association set (this is adapter-specific) attr_reader :associations # @!attribute [r] inferrer # @return [#call] An optional inferrer object used in `finalize!` attr_reader :inferrer # @!attribute [r] primary_key # @return [Array