lib/rom/sql/schema/attributes_inferrer.rb in rom-sql-3.6.4 vs lib/rom/sql/schema/attributes_inferrer.rb in rom-sql-4.0.0.alpha1
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-require 'dry/core/class_attributes'
+require "dry/core/class_attributes"
module ROM
module SQL
class Schema < ROM::Schema
# @api private
@@ -10,11 +10,11 @@
extend Dry::Core::ClassAttributes
extend Initializer
defines :type_builders
- CONSTRAINT_DB_TYPE = 'add_constraint'.freeze
+ CONSTRAINT_DB_TYPE = "add_constraint"
option :type_builder
option :attr_class, optional: true
@@ -28,10 +28,10 @@
type = type_builder.(**definition)
attr_class.new(type.meta(source: schema.name), name: name) if type
end.compact
- missing = columns.map(&:first) - inferred.map { |attr| attr.name }
+ missing = columns.map(&:first) - inferred.map(&:name)
[inferred, missing]
end
undef :with